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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc

Issue 12114034: Swap BrowserList::const_iterator for the multi-desktop aware BrowserIterator in many scenarios. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/browser_event_router.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
index e6677d18e5ecb5ca180940b116eb6997b65196a0..23f07cc23545e432f63f8aa8dc9499aac03d85b1 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/retargeting_details.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/view_type_utils.h"
#include "chrome/common/chrome_notification_types.h"
@@ -87,9 +88,8 @@ WebNavigationEventRouter::WebNavigationEventRouter(Profile* profile)
content::NotificationService::AllSources());
BrowserList::AddObserver(this);
- for (BrowserList::const_iterator iter = BrowserList::begin();
- iter != BrowserList::end(); ++iter) {
- OnBrowserAdded(*iter);
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ OnBrowserAdded(*it);
}
}
« no previous file with comments | « chrome/browser/extensions/api/tabs/tabs_api.cc ('k') | chrome/browser/extensions/browser_event_router.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698