| Index: chrome/browser/resources/settings/prefs/prefs.js
|
| diff --git a/chrome/browser/resources/settings/prefs/prefs.js b/chrome/browser/resources/settings/prefs/prefs.js
|
| index d46ff88776ceb394d102f6c2f641427a904f0ea9..4d39adc5b7f3fa0cb384e7563d204654ff0a676b 100644
|
| --- a/chrome/browser/resources/settings/prefs/prefs.js
|
| +++ b/chrome/browser/resources/settings/prefs/prefs.js
|
| @@ -267,22 +267,15 @@
|
| 'prefs-changed': 'prefsChanged_',
|
| },
|
|
|
| - settingsApi_: chrome.settingsPrivate,
|
| -
|
| initialize: function() {
|
| // Only initialize once (or after resetForTesting() is called).
|
| if (this.initialized_)
|
| return;
|
| this.initialized_ = true;
|
|
|
| - // Set window.mockApi to pass a custom settings API, i.e. for tests.
|
| - // TODO(michaelpg): don't use a global.
|
| - if (window.mockApi)
|
| - this.settingsApi_ = window.mockApi;
|
| -
|
| - this.settingsApi_.onPrefsChanged.addListener(
|
| + chrome.settingsPrivate.onPrefsChanged.addListener(
|
| this.onSettingsPrivatePrefsChanged_.bind(this));
|
| - this.settingsApi_.getAllPrefs(
|
| + chrome.settingsPrivate.getAllPrefs(
|
| this.onSettingsPrivatePrefsFetched_.bind(this));
|
| },
|
|
|
| @@ -308,7 +301,7 @@
|
| if (deepEqual(prefStoreValue, prefObj.value))
|
| return;
|
|
|
| - this.settingsApi_.setPref(
|
| + chrome.settingsPrivate.setPref(
|
| key,
|
| prefObj.value,
|
| /* pageId */ '',
|
| @@ -348,7 +341,7 @@
|
|
|
| // Get the current pref value from chrome.settingsPrivate to ensure the
|
| // UI stays up to date.
|
| - this.settingsApi_.getPref(key, function(pref) {
|
| + chrome.settingsPrivate.getPref(key, function(pref) {
|
| this.updatePrefs_([pref]);
|
| }.bind(this));
|
| },
|
|
|