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

Unified Diff: content/shell/browser/shell_devtools_frontend.cc

Issue 1079843002: DevTools: allow storing devtools preferences on the browser side. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed 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: content/shell/browser/shell_devtools_frontend.cc
diff --git a/content/shell/browser/shell_devtools_frontend.cc b/content/shell/browser/shell_devtools_frontend.cc
index a80490d48438b21ee9ea7e0f14f5646ca87319d2..6d8e163f34b2f533ec8a67296b878aeff4521372 100644
--- a/content/shell/browser/shell_devtools_frontend.cc
+++ b/content/shell/browser/shell_devtools_frontend.cc
@@ -224,6 +224,22 @@ void ShellDevToolsFrontend::HandleMessageFromDevToolsFrontend(
new ResponseWriter(weak_factory_.GetWeakPtr(), stream_id)));
fetcher->Start();
return;
+ } else if (method == "getPreferences") {
+ SendMessageAck(request_id, &preferences_);
+ return;
+ } else if (method == "setPreference") {
+ std::string name;
+ std::string value;
+ if (!params->GetString(0, &name) ||
+ !params->GetString(1, &value)) {
+ return;
+ }
+ preferences_.SetStringWithoutPathExpansion(name, value);
+ } else if (method == "removePreference") {
+ std::string name;
+ if (!params->GetString(0, &name))
+ return;
+ preferences_.RemoveWithoutPathExpansion(name, nullptr);
} else {
return;
}
« no previous file with comments | « content/shell/browser/shell_devtools_frontend.h ('k') | content/shell/renderer/test_runner/test_interfaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698