Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
index b03cc55cf136cfa5bd9bd002393d7feea0bd8cfd..f204285d54672fed7b3a8b22d66aba87004309c3 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
@@ -925,6 +925,20 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( |
void StartupBrowserCreatorImpl::AddStartupURLs( |
std::vector<GURL>* startup_urls) const { |
+ PrefService* prefs = profile_->GetPrefs(); |
+ bool has_reset_local_passphrase_switch = |
+ command_line_.HasSwitch(switches::kResetLocalPassphrase); |
+ if ((is_first_run_ || has_reset_local_passphrase_switch) && |
+ prefs->GetBoolean(prefs::kProfileIsManaged)) { |
+ startup_urls->insert(startup_urls->begin(), |
+ GURL(std::string(chrome::kChromeUISettingsURL) + |
+ chrome::kManagedUserSettingsSubPage)); |
+ if (has_reset_local_passphrase_switch) { |
+ prefs->SetString(prefs::kManagedModeLocalPassphrase, ""); |
+ prefs->SetString(prefs::kManagedModeLocalSalt, ""); |
+ } |
+ } |
+ |
// If we have urls specified by the first run master preferences use them |
// and nothing else. |
if (browser_creator_ && startup_urls->empty()) { |
@@ -954,20 +968,6 @@ void StartupBrowserCreatorImpl::AddStartupURLs( |
if (first_run::ShouldShowWelcomePage()) |
startup_urls->push_back(internals::GetWelcomePageURL()); |
} |
- |
- PrefService* prefs = profile_->GetPrefs(); |
- bool has_reset_local_passphrase_switch = |
- command_line_.HasSwitch(switches::kResetLocalPassphrase); |
- if ((is_first_run_ || has_reset_local_passphrase_switch) && |
- prefs->GetBoolean(prefs::kProfileIsManaged)) { |
- startup_urls->insert(startup_urls->begin(), |
- GURL(std::string(chrome::kChromeUISettingsURL) + |
- chrome::kManagedUserSettingsSubPage)); |
- if (has_reset_local_passphrase_switch) { |
- prefs->SetString(prefs::kManagedModeLocalPassphrase, ""); |
- prefs->SetString(prefs::kManagedModeLocalSalt, ""); |
- } |
- } |
} |
#if !defined(OS_WIN) || defined(USE_AURA) |