Chromium Code Reviews| 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 1d0cff342d18ac9971cb8391f5c1a9191412083b..5d056b4348d77c4da5c3b8d230d5dc385c47ae75 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| @@ -106,6 +106,11 @@ |
| #include "base/win/windows_version.h" |
| #endif |
| +#if defined(ENABLE_MANAGED_USERS) |
| +#include "chrome/browser/managed_mode/managed_user_service.h" |
| +#include "chrome/browser/managed_mode/managed_user_service_factory.h" |
| +#endif |
| + |
| using content::ChildProcessSecurityPolicy; |
| using content::WebContents; |
| using extensions::Extension; |
| @@ -924,19 +929,24 @@ void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( |
| void StartupBrowserCreatorImpl::AddStartupURLs( |
| std::vector<GURL>* startup_urls) const { |
| +#if defined(ENABLE_MANAGED_USERS) |
| PrefService* prefs = profile_->GetPrefs(); |
| bool has_reset_local_passphrase_switch = |
| command_line_.HasSwitch(switches::kResetLocalPassphrase); |
| + LOG(INFO) << is_first_run_; |
|
Bernhard Bauer
2013/04/10 09:30:03
Remove logging.
Adrian Kuegel
2013/04/10 09:47:01
Done.
|
| 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)); |
| + ManagedUserServiceFactory::GetForProfile( |
| + profile_)->set_startup_elevation(true); |
|
Bernhard Bauer
2013/04/10 09:30:03
This looks kinda ugly. Can you extract the Managed
Adrian Kuegel
2013/04/10 09:47:01
Done.
|
| if (has_reset_local_passphrase_switch) { |
| prefs->SetString(prefs::kManagedModeLocalPassphrase, std::string()); |
| prefs->SetString(prefs::kManagedModeLocalSalt, std::string()); |
| } |
| } |
| +#endif |
| // If we have urls specified by the first run master preferences use them |
| // and nothing else. |