| 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 3f6d37cb49a23f694c2141d321dbdf46e6268f0b..7600026364a8b94c10a3cc86958994e015ee8572 100644
|
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc
|
| @@ -924,6 +924,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()) {
|
| @@ -953,20 +967,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)
|
|
|