| Index: chrome/browser/chromeos/extensions/dictionary_event_router.cc
|
| diff --git a/chrome/browser/chromeos/extensions/dictionary_event_router.cc b/chrome/browser/chromeos/extensions/dictionary_event_router.cc
|
| index 7ee32c89eac1af67ce5103bb0901ea448a3e867b..f04d45fcaf4a6a5a91711b8de21f1aead3981d7c 100644
|
| --- a/chrome/browser/chromeos/extensions/dictionary_event_router.cc
|
| +++ b/chrome/browser/chromeos/extensions/dictionary_event_router.cc
|
| @@ -8,6 +8,7 @@
|
| #include <utility>
|
|
|
| #include "base/json/json_writer.h"
|
| +#include "base/memory/ptr_util.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/chromeos/extensions/input_method_api.h"
|
| #include "chrome/browser/spellchecker/spellcheck_factory.h"
|
| @@ -49,12 +50,11 @@ void ExtensionDictionaryEventRouter::DispatchLoadedEventIfLoaded() {
|
| return;
|
| }
|
|
|
| - std::unique_ptr<base::ListValue> args(new base::ListValue());
|
| // The router will only send the event to extensions that are listening.
|
| - std::unique_ptr<extensions::Event> event(new extensions::Event(
|
| + auto event = base::MakeUnique<extensions::Event>(
|
| extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_LOADED,
|
| - OnDictionaryLoaded::kEventName, std::move(args)));
|
| - event->restrict_to_browser_context = context_;
|
| + OnDictionaryLoaded::kEventName, base::MakeUnique<base::ListValue>(),
|
| + context_);
|
| router->BroadcastEvent(std::move(event));
|
| }
|
|
|
| @@ -84,10 +84,9 @@ void ExtensionDictionaryEventRouter::OnCustomDictionaryChanged(
|
| args->Append(std::move(removed_words));
|
|
|
| // The router will only send the event to extensions that are listening.
|
| - std::unique_ptr<extensions::Event> event(new extensions::Event(
|
| + auto event = base::MakeUnique<extensions::Event>(
|
| extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_CHANGED,
|
| - OnDictionaryChanged::kEventName, std::move(args)));
|
| - event->restrict_to_browser_context = context_;
|
| + OnDictionaryChanged::kEventName, std::move(args), context_);
|
| router->BroadcastEvent(std::move(event));
|
| }
|
|
|
|
|