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

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

Issue 10837192: Speculative revert to see if this change introduced a performance regression on Mac intl perf bots. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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/ui/browser_finder.h ('k') | chrome/browser/ui/browser_tab_restore_service_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_finder.cc
===================================================================
--- chrome/browser/ui/browser_finder.cc (revision 150796)
+++ chrome/browser/ui/browser_finder.cc (working copy)
@@ -153,6 +153,23 @@
return NULL;
}
+Browser* FindBrowserForController(
+ const content::NavigationController* controller,
+ int* index_result) {
+ for (BrowserList::const_iterator it = BrowserList::begin();
+ it != BrowserList::end(); ++it) {
+ int index = (*it)->tab_strip_model()->GetIndexOfWebContents(
+ controller->GetWebContents());
+ if (index != TabStripModel::kNoTab) {
+ if (index_result)
+ *index_result = index;
+ return *it;
+ }
+ }
+ return NULL;
+}
+
+
Browser* FindLastActiveWithProfile(Profile* profile) {
// We are only interested in last active browsers, so we don't fall back to
// all browsers like FindBrowserWith* do.
« no previous file with comments | « chrome/browser/ui/browser_finder.h ('k') | chrome/browser/ui/browser_tab_restore_service_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698