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

Unified Diff: chrome/browser/chromeos/extensions/dictionary_event_router.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 5ab4940b762808b2a6912b547a2b20499433c38b..d16c12fcd9a29c9be76603861022dc8b2ba5e90f 100644
--- a/chrome/browser/chromeos/extensions/dictionary_event_router.cc
+++ b/chrome/browser/chromeos/extensions/dictionary_event_router.cc
@@ -49,9 +49,9 @@ void ExtensionDictionaryEventRouter::DispatchLoadedEventIfLoaded() {
return;
}
- scoped_ptr<base::ListValue> args(new base::ListValue());
+ std::unique_ptr<base::ListValue> args(new base::ListValue());
// The router will only send the event to extensions that are listening.
- scoped_ptr<extensions::Event> event(new extensions::Event(
+ std::unique_ptr<extensions::Event> event(new extensions::Event(
extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_LOADED,
OnDictionaryLoaded::kEventName, std::move(args)));
event->restrict_to_browser_context = context_;
@@ -71,20 +71,20 @@ void ExtensionDictionaryEventRouter::OnCustomDictionaryChanged(
return;
}
- scoped_ptr<base::ListValue> added_words(new base::ListValue());
+ std::unique_ptr<base::ListValue> added_words(new base::ListValue());
for (const std::string& word : dictionary_change.to_add())
added_words->AppendString(word);
- scoped_ptr<base::ListValue> removed_words(new base::ListValue());
+ std::unique_ptr<base::ListValue> removed_words(new base::ListValue());
for (const std::string& word : dictionary_change.to_remove())
removed_words->AppendString(word);
- scoped_ptr<base::ListValue> args(new base::ListValue());
+ std::unique_ptr<base::ListValue> args(new base::ListValue());
args->Append(added_words.release());
args->Append(removed_words.release());
// The router will only send the event to extensions that are listening.
- scoped_ptr<extensions::Event> event(new extensions::Event(
+ std::unique_ptr<extensions::Event> event(new extensions::Event(
extensions::events::INPUT_METHOD_PRIVATE_ON_DICTIONARY_CHANGED,
OnDictionaryChanged::kEventName, std::move(args)));
event->restrict_to_browser_context = context_;

Powered by Google App Engine
This is Rietveld 408576698