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

Unified Diff: Source/devtools/front_end/Runtime.js

Issue 1088093002: Revert of DevTools: allow storing devtools preferences on the browser side. [blink] (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months 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
Index: Source/devtools/front_end/Runtime.js
diff --git a/Source/devtools/front_end/Runtime.js b/Source/devtools/front_end/Runtime.js
index 3e4c635a9d3662cab38121d29a3fd4cee4624496..53b8d4415b31f2eae7851e23a4349530c77d296e 100644
--- a/Source/devtools/front_end/Runtime.js
+++ b/Source/devtools/front_end/Runtime.js
@@ -1042,6 +1042,18 @@
var name = pair.shift();
Runtime._queryParamsObject[name] = pair.join("=");
}
+
+ // Patch settings from the URL param (for tests).
+ var settingsParam = Runtime.queryParam("settings");
+ if (settingsParam) {
+ try {
+ var settings = JSON.parse(window.decodeURI(settingsParam));
+ for (var key in settings)
+ window.localStorage[key] = settings[key];
+ } catch(e) {
+ // Ignore malformed settings.
+ }
+ }
})();}
« no previous file with comments | « LayoutTests/inspector/split-view-expected.txt ('k') | Source/devtools/front_end/bindings/BreakpointManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698