Index: extensions/browser/api/system_info/system_info_api.cc |
diff --git a/extensions/browser/api/system_info/system_info_api.cc b/extensions/browser/api/system_info/system_info_api.cc |
index a5b85bf801d2c7e752b0089272bfac88c8ba9d82..07d2dbda4ccc5ab15eefb1d8888119b93a52e55b 100644 |
--- a/extensions/browser/api/system_info/system_info_api.cc |
+++ b/extensions/browser/api/system_info/system_info_api.cc |
@@ -73,7 +73,8 @@ class SystemInfoEventRouter : public gfx::DisplayObserver, |
// Called from any thread to dispatch the systemInfo event to all extension |
// processes cross multiple profiles. |
- void DispatchEvent(const std::string& event_name, |
+ void DispatchEvent(events::HistogramValue histogram_value, |
+ const std::string& event_name, |
scoped_ptr<base::ListValue> args); |
// Called to dispatch the systemInfo.display.onDisplayChanged event. |
@@ -164,7 +165,8 @@ void SystemInfoEventRouter::OnRemovableStorageAttached( |
systeminfo::BuildStorageUnitInfo(info, &unit); |
scoped_ptr<base::ListValue> args(new base::ListValue); |
args->Append(unit.ToValue().release()); |
- DispatchEvent(system_storage::OnAttached::kEventName, args.Pass()); |
+ DispatchEvent(events::SYSTEM_STORAGE_ON_ATTACHED, |
+ system_storage::OnAttached::kEventName, args.Pass()); |
} |
void SystemInfoEventRouter::OnRemovableStorageDetached( |
@@ -175,7 +177,8 @@ void SystemInfoEventRouter::OnRemovableStorageDetached( |
info.device_id()); |
args->AppendString(transient_id); |
- DispatchEvent(system_storage::OnDetached::kEventName, args.Pass()); |
+ DispatchEvent(events::SYSTEM_STORAGE_ON_DETACHED, |
+ system_storage::OnDetached::kEventName, args.Pass()); |
} |
void SystemInfoEventRouter::OnDisplayAdded(const gfx::Display& new_display) { |
@@ -193,13 +196,16 @@ void SystemInfoEventRouter::OnDisplayMetricsChanged(const gfx::Display& display, |
void SystemInfoEventRouter::OnDisplayChanged() { |
scoped_ptr<base::ListValue> args(new base::ListValue()); |
- DispatchEvent(system_display::OnDisplayChanged::kEventName, args.Pass()); |
+ DispatchEvent(events::SYSTEM_DISPLAY_ON_DISPLAY_CHANGED, |
+ system_display::OnDisplayChanged::kEventName, args.Pass()); |
} |
-void SystemInfoEventRouter::DispatchEvent(const std::string& event_name, |
- scoped_ptr<base::ListValue> args) { |
- ExtensionsBrowserClient::Get()->BroadcastEventToRenderers(event_name, |
- args.Pass()); |
+void SystemInfoEventRouter::DispatchEvent( |
+ events::HistogramValue histogram_value, |
+ const std::string& event_name, |
+ scoped_ptr<base::ListValue> args) { |
+ ExtensionsBrowserClient::Get()->BroadcastEventToRenderers( |
+ histogram_value, event_name, args.Pass()); |
} |
void AddEventListener(const std::string& event_name) { |