diff options
| author | mrmr1993 | 2015-04-27 17:07:16 +0100 | 
|---|---|---|
| committer | mrmr1993 | 2015-05-29 12:06:00 +0100 | 
| commit | 31873e39772c538cab418d03c244b4cac1addba0 (patch) | |
| tree | 798a24aa8ba39c16aa6c90b26c01e2938cddffe4 /background_scripts | |
| parent | 960ccc627c4e55a7bdc53eead255270d9504a8bf (diff) | |
| download | vimium-31873e39772c538cab418d03c244b4cac1addba0.tar.bz2 | |
Remove all direct calls to Sync, stop exporting it
This stops Sync from being referred to from anywhere except
settings.coffee and settings_test.coffee.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/main.coffee | 2 | ||||
| -rw-r--r-- | background_scripts/settings.coffee | 6 | 
2 files changed, 6 insertions, 2 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index a13d9d98..edcdf3b2 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -744,5 +744,5 @@ chrome.windows.getAll { populate: true }, (windows) ->        chrome.tabs.sendMessage(tab.id, { name: "getScrollPosition" }, createScrollPositionHandler())  # Start pulling changes from synchronized storage. -Sync.init() +Settings.init()  showUpgradeMessage() diff --git a/background_scripts/settings.coffee b/background_scripts/settings.coffee index 81bc8589..44676ad7 100644 --- a/background_scripts/settings.coffee +++ b/background_scripts/settings.coffee @@ -14,7 +14,7 @@  #  root = exports ? window -root.Sync = Sync = +Sync =    storage: chrome.storage.sync    doNotSync: ["settingsVersion", "previousVersion"] @@ -55,6 +55,7 @@ root.Sync = Sync =  #  root.Settings = Settings = +  init: -> Sync.init()    get: (key) ->      if (key of localStorage) then JSON.parse(localStorage[key]) else @defaults[key] @@ -178,6 +179,9 @@ root.Settings = Settings =      settingsVersion: Utils.getCurrentVersion() +# Export Sync via Settings for tests. +root.Settings.Sync = Sync +  # We use settingsVersion to coordinate any necessary schema changes.  if Utils.compareVersions("1.42", Settings.get("settingsVersion")) != -1  | 
