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

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: 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
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..e575532a8cefebee14476a82f95f530651be72a9 100644
--- a/chrome/browser/extensions/api/debugger/debugger_api.cc
+++ b/chrome/browser/extensions/api/debugger/debugger_api.cc
@@ -254,12 +254,9 @@ 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);
-
+ scoped_ptr<std::string> json_args(OnDetach::ToJson(debuggee));
not at google - send to devlin 2012/07/24 23:04:29 just return string
mitchellwrosen 2012/07/25 17:08:20 Done.
profile->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, keys::kOnDetach, json_args, profile, GURL());
+ extension_id_, keys::kOnDetach, *json_args, profile, GURL());
}
}
@@ -310,12 +307,11 @@ 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);
+ scoped_ptr<std::string> json_args(OnEvent::ToJson(debuggee, method_name,
+ params));
not at google - send to devlin 2012/07/24 23:04:29 nit: argument should be on same line or line up ve
mitchellwrosen 2012/07/25 17:08:20 Oh, I've seen it both ways. I thought the style gu
profile->GetExtensionEventRouter()->DispatchEventToExtension(
- extension_id_, keys::kOnEvent, json_args, profile, GURL());
+ extension_id_, keys::kOnEvent, *json_args, profile, GURL());
} else {
SendCommandDebuggerFunction* function = pending_requests_[id];
if (!function)
« no previous file with comments | « no previous file | tools/json_schema_compiler/cc_generator.py » ('j') | tools/json_schema_compiler/cc_generator.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698