зеркало из https://github.com/mozilla/pjs.git
listen to sync.enabled pref and enable/disable auto sync
This commit is contained in:
Родитель
1fa4216f9b
Коммит
578e8848b6
|
@ -1300,6 +1300,18 @@ BookmarksSyncService.prototype = {
|
|||
|
||||
observe: function BSS__observe(subject, topic, data) {
|
||||
switch (topic) {
|
||||
case "browser.places.sync.enabled":
|
||||
switch (data) {
|
||||
case false:
|
||||
this._log.info("Disabling automagic bookmarks sync");
|
||||
this._disableSchedule();
|
||||
break;
|
||||
case true:
|
||||
this._log.info("Enabling automagic bookmarks sync");
|
||||
this._enableSchedule();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "browser.places.sync.schedule":
|
||||
switch (data) {
|
||||
case 0:
|
||||
|
|
Загрузка…
Ссылка в новой задаче