Index: chrome/browser/extensions/extension_idle_api.cc |
diff --git a/chrome/browser/extensions/extension_idle_api.cc b/chrome/browser/extensions/extension_idle_api.cc |
index 87ce7641ce56291ff96a6dba86677042d0e0c230..845e1b9334d9172d441f8d3aacbf75a06e5b4abb 100644 |
--- a/chrome/browser/extensions/extension_idle_api.cc |
+++ b/chrome/browser/extensions/extension_idle_api.cc |
@@ -139,13 +139,11 @@ int CheckThresholdBounds(int timeout) { |
void ExtensionIdleEventRouter::OnIdleStateChange(Profile* profile, |
IdleState state) { |
// Prepare the single argument of the current state. |
- ListValue args; |
- args.Append(CreateIdleValue(state)); |
- std::string json_args; |
- base::JSONWriter::Write(&args, &json_args); |
+ ListValue* args = new ListValue(); |
+ args->Append(CreateIdleValue(state)); |
profile->GetExtensionEventRouter()->DispatchEventToRenderers( |
- keys::kOnStateChanged, json_args, profile, GURL(), EventFilteringInfo()); |
+ keys::kOnStateChanged, args, profile, GURL(), EventFilteringInfo()); |
} |
bool ExtensionIdleQueryStateFunction::RunImpl() { |