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

Unified Diff: chrome/browser/extensions/api/runtime/runtime_api.cc

Issue 10694085: Refactor extension event distribution to use Values instead of JSON strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing memory leak in a test. Created 8 years, 4 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/runtime/runtime_api.cc
diff --git a/chrome/browser/extensions/api/runtime/runtime_api.cc b/chrome/browser/extensions/api/runtime/runtime_api.cc
index 4376b799662c22993b438c16635d2cd5f83ef39c..47b8f571b5716a4b63e9fa22d4a19dcfd32af1ba 100644
--- a/chrome/browser/extensions/api/runtime/runtime_api.cc
+++ b/chrome/browser/extensions/api/runtime/runtime_api.cc
@@ -35,9 +35,10 @@ void RuntimeEventRouter::DispatchOnInstalledEvent(
// chance to register for events. So we register on its behalf. If the
// extension does not actually have a listener, the event will just be
// ignored.
+ scoped_ptr<ListValue> event_args(new ListValue());
system->event_router()->AddLazyEventListener(kOnInstalledEvent, extension_id);
system->event_router()->DispatchEventToExtension(
- extension_id, kOnInstalledEvent, "[]", NULL, GURL());
+ extension_id, kOnInstalledEvent, event_args.Pass(), NULL, GURL());
}
bool RuntimeGetBackgroundPageFunction::RunImpl() {

Powered by Google App Engine
This is Rietveld 408576698