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

Unified Diff: chrome/browser/ui/browser_list.cc

Issue 8227038: Sync Promo: Close browser tab when closing promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove old code Created 9 years, 2 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/browser_list.cc
diff --git a/chrome/browser/ui/browser_list.cc b/chrome/browser/ui/browser_list.cc
index 1d3f06c372558e3ab7ed4036b229c5ba4f25a914..4cc0b528376dc218b7830defc91112e31c40aefa 100644
--- a/chrome/browser/ui/browser_list.cc
+++ b/chrome/browser/ui/browser_list.cc
@@ -684,6 +684,16 @@ Browser* BrowserList::FindBrowserWithWindow(gfx::NativeWindow window) {
}
// static
+Browser* BrowserList::FindBrowserWithTabContents(TabContents* tab_contents) {
James Hawkins 2011/10/12 17:34:18 DCHECK(tab_contents).
sail 2011/10/12 17:54:12 Done.
+ for (TabContentsIterator it; !it.done(); ++it) {
+ TabContents* tab = it->tab_contents();
James Hawkins 2011/10/12 17:34:18 if (it->tab_contents() == tab_contents) return i
sail 2011/10/12 17:54:12 Done.
sail 2011/10/12 17:54:12 Done.
+ if (tab == tab_contents)
+ return it.browser();
+ }
+ return NULL;
+}
+
+// static
size_t BrowserList::GetBrowserCountForType(Profile* profile,
bool match_tabbed) {
size_t result = 0;

Powered by Google App Engine
This is Rietveld 408576698