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

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

Issue 2487373002: DevTools: settings of custom devtools should not interfere with bundled devtools (Closed)
Patch Set: Created 4 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/host/Platform.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 8d8eb897fbddcf93fc510f1e65ea5a55d4a106bb..a6e8fd3bf502604ed4e5fb001d6d0de0eec7857a 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -73,9 +73,14 @@ WebInspector.Main = class {
*/
_createSettings(prefs) {
this._initializeExperiments(prefs);
- WebInspector.settings = new WebInspector.Settings(new WebInspector.SettingsStorage(
+ var storagePrefix = WebInspector.isCustomDevtoolsFrontend() ? '__custom__' : '';
+ var clearLocalStorage = window.localStorage ? window.localStorage.clear.bind(window.localStorage) : undefined;
+ var localStorage =
+ new WebInspector.SettingsStorage(window.localStorage || {}, undefined, undefined, clearLocalStorage, storagePrefix);
+ var globalStorage = new WebInspector.SettingsStorage(
prefs, InspectorFrontendHost.setPreference, InspectorFrontendHost.removePreference,
- InspectorFrontendHost.clearPreferences));
+ InspectorFrontendHost.clearPreferences, storagePrefix);
+ WebInspector.settings = new WebInspector.Settings(globalStorage, localStorage);
if (!InspectorFrontendHost.isUnderTest())
new WebInspector.VersionController().updateVersion();
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/host/Platform.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698