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

Unified Diff: chrome/browser/extensions/api/api_resource_event_notifier.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
« no previous file with comments | « chrome/browser/extensions/api/alarms/alarm_manager.cc ('k') | chrome/browser/extensions/api/app/app_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/api_resource_event_notifier.cc
diff --git a/chrome/browser/extensions/api/api_resource_event_notifier.cc b/chrome/browser/extensions/api/api_resource_event_notifier.cc
index 9fa60f7c64959aa6452b4935e4ff54cfae1dbf1d..0bc328c0136ddfb46fa34af20e4a9ae61ea8a425 100644
--- a/chrome/browser/extensions/api/api_resource_event_notifier.cc
+++ b/chrome/browser/extensions/api/api_resource_event_notifier.cc
@@ -95,10 +95,10 @@ void ApiResourceEventNotifier::DispatchEventOnUIThread(
const std::string &extension, DictionaryValue* event) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- ListValue args;
- args.Set(0, event);
- router_->DispatchEventToExtension(src_extension_id_, extension, args,
- profile_, src_url_);
+ scoped_ptr<ListValue> arguments(new ListValue());
+ arguments->Set(0, event);
+ router_->DispatchEventToExtension(src_extension_id_, extension,
+ arguments.Pass(), profile_, src_url_);
}
DictionaryValue* ApiResourceEventNotifier::CreateApiResourceEvent(
« no previous file with comments | « chrome/browser/extensions/api/alarms/alarm_manager.cc ('k') | chrome/browser/extensions/api/app/app_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698