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

Unified Diff: chrome/browser/extensions/api/debugger/debugger_api.cc

Issue 10796114: Added ToJson to JSON schema compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed scope Created 8 years, 5 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
« no previous file with comments | « no previous file | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/debugger/debugger_api.cc
diff --git a/chrome/browser/extensions/api/debugger/debugger_api.cc b/chrome/browser/extensions/api/debugger/debugger_api.cc
index 07e7acc9259bcba7eadf0976b80a7d4b0e4e177b..02884c922131fd2d640f195bc7379c380f180389 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -254,10 +254,7 @@ void ExtensionDevToolsClientHost::SendDetachedEvent() {
Debuggee debuggee;
debuggee.tab_id = tab_id_;
- scoped_ptr<base::ListValue> args(OnDetach::Create(debuggee));
- std::string json_args;
- base::JSONWriter::Write(args.get(), &json_args);
-
+ std::string json_args = OnDetach::ToJson(debuggee);
profile->GetExtensionEventRouter()->DispatchEventToExtension(
extension_id_, keys::kOnDetach, json_args, profile, GURL());
}
@@ -310,9 +307,7 @@ void ExtensionDevToolsClientHost::DispatchOnInspectorFrontend(
if (dictionary->GetDictionary("params", &params_value))
params.additional_properties.Swap(params_value);
- scoped_ptr<ListValue> args(OnEvent::Create(debuggee, method_name, params));
- std::string json_args;
- base::JSONWriter::Write(args.get(), &json_args);
+ std::string json_args = OnEvent::ToJson(debuggee, method_name, params);
profile->GetExtensionEventRouter()->DispatchEventToExtension(
extension_id_, keys::kOnEvent, json_args, profile, GURL());
« no previous file with comments | « no previous file | tools/json_schema_compiler/cc_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698