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

Unified Diff: chrome/browser/ui/webui/sync_internals_message_handler.cc

Issue 160083002: Refactor about:sync's events framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add semicolons Created 6 years, 10 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 | « chrome/browser/ui/webui/sync_internals_browsertest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/sync_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.cc b/chrome/browser/ui/webui/sync_internals_message_handler.cc
index 6a52ecebeaf25e523b7075ce6e150fc3b06d676f..ecd38eb94f842d4560b457c28b8da54731e1de50 100644
--- a/chrome/browser/ui/webui/sync_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/sync_internals_message_handler.cc
@@ -95,9 +95,9 @@ void SyncInternalsMessageHandler::HandleJsEvent(
const JsEventDetails& details) {
DVLOG(1) << "Handling event: " << name
<< " with details " << details.ToString();
- const std::string& event_handler = "chrome.sync." + name + ".fire";
- std::vector<const base::Value*> arg_list(1, &details.Get());
- web_ui()->CallJavascriptFunction(event_handler, arg_list);
+ web_ui()->CallJavascriptFunction("chrome.sync.dispatchEvent",
+ base::StringValue(name),
+ details.Get());
}
void SyncInternalsMessageHandler::RegisterJsControllerCallback(
« no previous file with comments | « chrome/browser/ui/webui/sync_internals_browsertest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698