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

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

Issue 10391158: Moves methods for finding browsers to browser_finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fixs Created 8 years, 7 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_navigator.cc
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index d08dc29623a0007de1c5940b88b47282bd8f853f..2f1af3e2f09ffa32d2491bc3429c589998c3d812 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -22,7 +22,7 @@
#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/tab_contents/tab_util.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_list.h"
+#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/status_bubble.h"
@@ -56,7 +56,7 @@ bool WindowCanOpenTabs(Browser* browser) {
// Finds an existing Browser compatible with |profile|, making a new one if no
// such Browser is located.
Browser* GetOrCreateBrowser(Profile* profile) {
- Browser* browser = BrowserList::FindTabbedBrowser(profile, false);
+ Browser* browser = browser::FindTabbedBrowser(profile, false);
return browser ? browser : Browser::Create(profile);
}
@@ -101,7 +101,7 @@ bool AdjustNavigateParamsForURL(browser::NavigateParams* params) {
params->disposition = SINGLETON_TAB;
params->profile = profile;
- params->browser = Browser::GetOrCreateTabbedBrowser(profile);
+ params->browser = browser::FindOrCreateTabbedBrowser(profile);
params->window_action = browser::NavigateParams::SHOW_WINDOW;
}
@@ -127,7 +127,7 @@ Browser* GetBrowserForDisposition(browser::NavigateParams* params) {
case CURRENT_TAB:
if (!params->browser && profile) {
// We specified a profile instead of a browser; find or create one.
- params->browser = Browser::GetOrCreateTabbedBrowser(profile);
+ params->browser = browser::FindOrCreateTabbedBrowser(profile);
}
return params->browser;
case SINGLETON_TAB:

Powered by Google App Engine
This is Rietveld 408576698