Chromium Code Reviews| Index: chrome/browser/ui/browser.cc |
| diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
| index 4023c19829043fc3e1ed8f15ab2028fcefc22cc7..f183d9b6fc205f4bc3cd89a2e15abd882dc9b1e6 100644 |
| --- a/chrome/browser/ui/browser.cc |
| +++ b/chrome/browser/ui/browser.cc |
| @@ -2952,6 +2952,11 @@ void Browser::UpdateUIForNavigationInTab(TabContentsWrapper* contents, |
| } |
| GURL Browser::GetHomePage() const { |
| + return GetHomePageForProfile(profile_); |
| +} |
| + |
| +// static |
| +GURL Browser::GetHomePageForProfile(Profile* profile) { |
|
sky
2011/10/28 16:05:59
I don't think this method makes much sense on Brow
sail
2011/10/28 17:50:57
Done.
|
| // --homepage overrides any preferences. |
| const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| if (command_line.HasSwitch(switches::kHomePage)) { |
| @@ -2968,10 +2973,10 @@ GURL Browser::GetHomePage() const { |
| return home_page; |
| } |
| - if (profile_->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage)) |
| + if (profile->GetPrefs()->GetBoolean(prefs::kHomePageIsNewTabPage)) |
| return GURL(chrome::kChromeUINewTabURL); |
| GURL home_page(URLFixerUpper::FixupURL( |
| - profile_->GetPrefs()->GetString(prefs::kHomePage), |
| + profile->GetPrefs()->GetString(prefs::kHomePage), |
| std::string())); |
| if (!home_page.is_valid()) |
| return GURL(chrome::kChromeUINewTabURL); |