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

Unified Diff: chrome/browser/devtools/browser_list_tabcontents_provider.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
Index: chrome/browser/devtools/browser_list_tabcontents_provider.cc
diff --git a/chrome/browser/devtools/browser_list_tabcontents_provider.cc b/chrome/browser/devtools/browser_list_tabcontents_provider.cc
index 53cb75e36fb6974702ecea3740f28a6d552818b9..4e461ce624ea03f37bd3fa32e0d4f9d3a470e998 100644
--- a/chrome/browser/devtools/browser_list_tabcontents_provider.cc
+++ b/chrome/browser/devtools/browser_list_tabcontents_provider.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
@@ -33,10 +34,9 @@ BrowserListTabContentsProvider::~BrowserListTabContentsProvider() {
std::string BrowserListTabContentsProvider::GetDiscoveryPageHTML() {
std::set<Profile*> profiles;
- for (BrowserList::const_iterator it = BrowserList::begin(),
- end = BrowserList::end(); it != end; ++it) {
+ for (chrome::BrowserIterator it; !it.done(); it.Next())
profiles.insert((*it)->profile());
- }
+
for (std::set<Profile*>::iterator it = profiles.begin();
it != profiles.end(); ++it) {
history::TopSites* ts = (*it)->GetTopSites();
@@ -66,8 +66,7 @@ FilePath BrowserListTabContentsProvider::GetDebugFrontendDir() {
std::string BrowserListTabContentsProvider::GetPageThumbnailData(
const GURL& url) {
- for (BrowserList::const_iterator it = BrowserList::begin(),
- end = BrowserList::end(); it != end; ++it) {
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
Profile* profile = (*it)->profile();
history::TopSites* top_sites = profile->GetTopSites();
if (!top_sites)
« no previous file with comments | « chrome/browser/custom_home_pages_table_model.cc ('k') | chrome/browser/extensions/api/cookies/cookies_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698