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

Unified Diff: chrome/browser/ui/tab_contents/tab_contents_iterator.h

Issue 1644773003: Remove BrowserIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-desktop-1
Patch Set: . Created 4 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/ui/tab_contents/tab_contents_iterator.h
diff --git a/chrome/browser/ui/tab_contents/tab_contents_iterator.h b/chrome/browser/ui/tab_contents/tab_contents_iterator.h
index 13bfba058a9fc9af4ad8c3720dce8ddb1195d9ef..b13bdb5fc64d36c6f128ca2a9a2bb2204b8f3d45 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_iterator.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_iterator.h
@@ -8,7 +8,7 @@
#include <set>
#include "base/macros.h"
-#include "chrome/browser/ui/browser_iterator.h"
+#include "chrome/browser/ui/browser_list.h"
namespace content {
class WebContents;
@@ -29,6 +29,7 @@ class WebContents;
class TabContentsIterator {
public:
TabContentsIterator();
+ ~TabContentsIterator();
// Returns true if we are past the last Browser.
bool done() const { return cur_ == NULL; }
@@ -36,7 +37,7 @@ class TabContentsIterator {
// Returns the Browser instance associated with the current
// WebContents. Valid as long as !done().
Browser* browser() const {
- if (!browser_iterator_.done())
+ if (browser_iterator_ != BrowserList::GetInstance()->end())
return *browser_iterator_;
return NULL;
}
@@ -64,7 +65,7 @@ class TabContentsIterator {
content::WebContents* cur_;
// An iterator over all the browsers.
- chrome::BrowserIterator browser_iterator_;
+ BrowserList::const_iterator browser_iterator_;
DISALLOW_COPY_AND_ASSIGN(TabContentsIterator);
};

Powered by Google App Engine
This is Rietveld 408576698