Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(664)

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 1449143002: DevTools: remove Object.observe usage, it is being deprecated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removeAll added Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/common/Settings.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/main/Main.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index b55bdd85c4145c7ec9b00b6232012a6082d3b064..8a71ef17e0f4efba3157901b5342e203146ab25c 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -90,28 +90,8 @@ WebInspector.Main.prototype = {
}
this._initializeExperiments(prefs);
-
- /**
- * @param {!Array<{name: string}>} changes
- */
- function trackPrefsObject(changes)
- {
- if (!Object.keys(prefs).length) {
- InspectorFrontendHost.clearPreferences();
- return;
- }
-
- for (var change of changes) {
- var name = change.name;
- if (name in prefs)
- InspectorFrontendHost.setPreference(name, prefs[name]);
- else
- InspectorFrontendHost.removePreference(name);
- }
- }
-
- Object.observe(prefs, trackPrefsObject);
- WebInspector.settings = new WebInspector.Settings(prefs);
+ WebInspector.settings = new WebInspector.Settings(new WebInspector.SettingsStorage(prefs,
+ InspectorFrontendHost.setPreference, InspectorFrontendHost.removePreference, InspectorFrontendHost.clearPreferences));
if (!InspectorFrontendHost.isUnderTest())
new WebInspector.VersionController().updateVersion();
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/common/Settings.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698