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

Unified Diff: chrome/browser/extensions/api/input_ime/input_ime_api.cc

Issue 2294653002: Some linked_ptr -> unique_ptr conversion in extensions/browser. (Closed)
Patch Set: address comments Created 4 years, 4 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/extensions/api/input_ime/input_ime_api.cc
diff --git a/chrome/browser/extensions/api/input_ime/input_ime_api.cc b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
index c95a9b3ab5e5db3b8c7cbca41d826a86032a729e..c25debb28169795639e8ff22f50e92272b12b584 100644
--- a/chrome/browser/extensions/api/input_ime/input_ime_api.cc
+++ b/chrome/browser/extensions/api/input_ime/input_ime_api.cc
@@ -174,14 +174,12 @@ bool ImeObserver::ShouldForwardKeyEvent() const {
// the key events, and therefore, all key events will be eaten.
// This is for error-tolerance, and it means that onKeyEvent will never wake
// up lazy background page.
- const extensions::EventListenerMap::ListenerList& listener_list =
+ const extensions::EventListenerMap::ListenerList& listeners =
extensions::EventRouter::Get(profile_)
->listeners()
.GetEventListenersByName(input_ime::OnKeyEvent::kEventName);
- for (extensions::EventListenerMap::ListenerList::const_iterator it =
- listener_list.begin();
- it != listener_list.end(); ++it) {
- if ((*it)->extension_id() == extension_id_ && !(*it)->IsLazy())
+ for (const std::unique_ptr<extensions::EventListener>& listener : listeners) {
+ if (listener->extension_id() == extension_id_ && !listener->IsLazy())
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698