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

Unified Diff: chrome/browser/task_manager/task_manager_resource_providers.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/sessions/session_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/task_manager/task_manager_resource_providers.cc
diff --git a/chrome/browser/task_manager/task_manager_resource_providers.cc b/chrome/browser/task_manager/task_manager_resource_providers.cc
index f7669b4a3d1e83cbdf3e5e81f81540ea86bb6354..cdc514f8671448e4bbb593f1e7d81e7a0371cc45 100644
--- a/chrome/browser/task_manager/task_manager_resource_providers.cc
+++ b/chrome/browser/task_manager/task_manager_resource_providers.cc
@@ -40,7 +40,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_instant_controller.h"
-#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_iterator.h"
#include "chrome/browser/ui/panels/panel.h"
#include "chrome/browser/ui/panels/panel_manager.h"
#include "chrome/browser/ui/tab_contents/tab_contents_iterator.h"
@@ -159,10 +159,9 @@ bool IsContentsPrerendering(WebContents* web_contents) {
}
bool IsContentsInstant(WebContents* web_contents) {
- for (BrowserList::const_iterator i = BrowserList::begin();
- i != BrowserList::end(); ++i) {
- if ((*i)->instant_controller() &&
- (*i)->instant_controller()->instant()->
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ if (it->instant_controller() &&
+ it->instant_controller()->instant()->
GetPreviewContents() == web_contents) {
return true;
}
@@ -447,11 +446,10 @@ void TaskManagerTabContentsResourceProvider::StartUpdating() {
Add(*iterator);
// Add all the instant pages.
- for (BrowserList::const_iterator i = BrowserList::begin();
- i != BrowserList::end(); ++i) {
- if ((*i)->instant_controller() &&
- (*i)->instant_controller()->instant()->GetPreviewContents()) {
- Add((*i)->instant_controller()->instant()->GetPreviewContents());
+ for (chrome::BrowserIterator it; !it.done(); it.Next()) {
+ if (it->instant_controller() &&
+ it->instant_controller()->instant()->GetPreviewContents()) {
+ Add(it->instant_controller()->instant()->GetPreviewContents());
}
}
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/ui/browser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698