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

Unified Diff: components/renderer_context_menu/render_view_context_menu_base.cc

Issue 982413002: base: Stop passing a non-const ref to ObserverListBase::Iterator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: observerref: fixwindowsbuild Created 5 years, 9 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: components/renderer_context_menu/render_view_context_menu_base.cc
diff --git a/components/renderer_context_menu/render_view_context_menu_base.cc b/components/renderer_context_menu/render_view_context_menu_base.cc
index 80f26bc644ed9f3966dd7aba33b8c2aac2fc91ee..3d9487ac288aa543fd2fc81f001f28747b4bf1ec 100644
--- a/components/renderer_context_menu/render_view_context_menu_base.cc
+++ b/components/renderer_context_menu/render_view_context_menu_base.cc
@@ -266,7 +266,7 @@ bool RenderViewContextMenuBase::IsCommandIdKnown(
bool* enabled) const {
// If this command is is added by one of our observers, we dispatch
// it to the observer.
- ObserverListBase<RenderViewContextMenuObserver>::Iterator it(observers_);
+ ObserverListBase<RenderViewContextMenuObserver>::Iterator it(&observers_);
RenderViewContextMenuObserver* observer;
while ((observer = it.GetNext()) != NULL) {
if (observer->IsCommandIdSupported(id)) {
@@ -289,7 +289,7 @@ bool RenderViewContextMenuBase::IsCommandIdKnown(
bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
// If this command is is added by one of our observers, we dispatch it to the
// observer.
- ObserverListBase<RenderViewContextMenuObserver>::Iterator it(observers_);
+ ObserverListBase<RenderViewContextMenuObserver>::Iterator it(&observers_);
RenderViewContextMenuObserver* observer;
while ((observer = it.GetNext()) != NULL) {
if (observer->IsCommandIdSupported(id))
@@ -309,7 +309,7 @@ void RenderViewContextMenuBase::ExecuteCommand(int id, int event_flags) {
// If this command is is added by one of our observers, we dispatch
// it to the observer.
- ObserverListBase<RenderViewContextMenuObserver>::Iterator it(observers_);
+ ObserverListBase<RenderViewContextMenuObserver>::Iterator it(&observers_);
RenderViewContextMenuObserver* observer;
while ((observer = it.GetNext()) != NULL) {
if (observer->IsCommandIdSupported(id))
« no previous file with comments | « chrome/browser/extensions/extension_toolbar_model.cc ('k') | content/browser/loader/resource_dispatcher_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698