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

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

Issue 13468005: Show only the settings pages for new managed users (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 7 years, 9 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/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)

Powered by Google App Engine
This is Rietveld 408576698