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

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

Issue 8343052: Sync Promo: Tweak first tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: diff against correct branch 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
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4023c19829043fc3e1ed8f15ab2028fcefc22cc7..ad054f59fd2bc1eb3b44a84f04e0ffe3d8ad8350 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1523,7 +1523,7 @@ void Browser::ReloadInternal(WindowOpenDisposition disposition,
void Browser::Home(WindowOpenDisposition disposition) {
UserMetrics::RecordAction(UserMetricsAction("Home"));
OpenURL(
- GetHomePage(), GURL(), disposition,
+ profile_->GetHomePage(), GURL(), disposition,
content::PageTransitionFromInt(
content::PAGE_TRANSITION_AUTO_BOOKMARK |
content::PAGE_TRANSITION_HOME_PAGE));
@@ -2951,33 +2951,6 @@ void Browser::UpdateUIForNavigationInTab(TabContentsWrapper* contents,
contents->tab_contents()->Focus();
}
-GURL Browser::GetHomePage() const {
- // --homepage overrides any preferences.
- const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- if (command_line.HasSwitch(switches::kHomePage)) {
- // TODO(evanm): clean up usage of DIR_CURRENT.
- // http://code.google.com/p/chromium/issues/detail?id=60630
- // For now, allow this code to call getcwd().
- base::ThreadRestrictions::ScopedAllowIO allow_io;
-
- FilePath browser_directory;
- PathService::Get(base::DIR_CURRENT, &browser_directory);
- GURL home_page(URLFixerUpper::FixupRelativeFile(browser_directory,
- command_line.GetSwitchValuePath(switches::kHomePage)));
- if (home_page.is_valid())
- return home_page;
- }
-
- if (profile_->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage))
- return GURL(chrome::kChromeUINewTabURL);
- GURL home_page(URLFixerUpper::FixupURL(
- profile_->GetPrefs()->GetString(prefs::kHomePage),
- std::string()));
- if (!home_page.is_valid())
- return GURL(chrome::kChromeUINewTabURL);
- return home_page;
-}
-
///////////////////////////////////////////////////////////////////////////////
// Browser, PageNavigator implementation:
« no previous file with comments | « chrome/browser/ui/browser.h ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698