| Index: chrome/browser/history/history_extension_api.cc
|
| diff --git a/chrome/browser/history/history_extension_api.cc b/chrome/browser/history/history_extension_api.cc
|
| index ee11af98a133a2f3a843cac693c246fe6b26740b..54d77939cd02ae0d7b6daf6c010d22196fd019c1 100644
|
| --- a/chrome/browser/history/history_extension_api.cc
|
| +++ b/chrome/browser/history/history_extension_api.cc
|
| @@ -159,9 +159,7 @@ void HistoryExtensionEventRouter::HistoryUrlVisited(
|
| scoped_ptr<HistoryItem> history_item = GetHistoryItem(details->row);
|
| scoped_ptr<ListValue> args = OnVisited::Create(*history_item);
|
|
|
| - std::string json_args;
|
| - base::JSONWriter::Write(args.get(), &json_args);
|
| - DispatchEvent(profile, kOnVisited, json_args);
|
| + DispatchEvent(profile, kOnVisited, args.Pass());
|
| }
|
|
|
| void HistoryExtensionEventRouter::HistoryUrlsRemoved(
|
| @@ -178,17 +176,16 @@ void HistoryExtensionEventRouter::HistoryUrlsRemoved(
|
| removed.urls.reset(urls);
|
|
|
| scoped_ptr<ListValue> args = OnVisitRemoved::Create(removed);
|
| - std::string json_args;
|
| - base::JSONWriter::Write(args.get(), &json_args);
|
| - DispatchEvent(profile, kOnVisitRemoved, json_args);
|
| + DispatchEvent(profile, kOnVisitRemoved, args.Pass());
|
| }
|
|
|
| -void HistoryExtensionEventRouter::DispatchEvent(Profile* profile,
|
| - const char* event_name,
|
| - const std::string& json_args) {
|
| +void HistoryExtensionEventRouter::DispatchEvent(
|
| + Profile* profile,
|
| + const char* event_name,
|
| + scoped_ptr<ListValue> event_args) {
|
| if (profile && profile->GetExtensionEventRouter()) {
|
| profile->GetExtensionEventRouter()->DispatchEventToRenderers(
|
| - event_name, json_args, profile, GURL(),
|
| + event_name, event_args.Pass(), profile, GURL(),
|
| extensions::EventFilteringInfo());
|
| }
|
| }
|
|
|