| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" | 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "apps/app_restore_service.h" | 10 #include "apps/app_restore_service.h" |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 std::vector<GURL>* startup_urls) const { | 926 std::vector<GURL>* startup_urls) const { |
| 927 PrefService* prefs = profile_->GetPrefs(); | 927 PrefService* prefs = profile_->GetPrefs(); |
| 928 bool has_reset_local_passphrase_switch = | 928 bool has_reset_local_passphrase_switch = |
| 929 command_line_.HasSwitch(switches::kResetLocalPassphrase); | 929 command_line_.HasSwitch(switches::kResetLocalPassphrase); |
| 930 if ((is_first_run_ || has_reset_local_passphrase_switch) && | 930 if ((is_first_run_ || has_reset_local_passphrase_switch) && |
| 931 prefs->GetBoolean(prefs::kProfileIsManaged)) { | 931 prefs->GetBoolean(prefs::kProfileIsManaged)) { |
| 932 startup_urls->insert(startup_urls->begin(), | 932 startup_urls->insert(startup_urls->begin(), |
| 933 GURL(std::string(chrome::kChromeUISettingsURL) + | 933 GURL(std::string(chrome::kChromeUISettingsURL) + |
| 934 chrome::kManagedUserSettingsSubPage)); | 934 chrome::kManagedUserSettingsSubPage)); |
| 935 if (has_reset_local_passphrase_switch) { | 935 if (has_reset_local_passphrase_switch) { |
| 936 prefs->SetString(prefs::kManagedModeLocalPassphrase, ""); | 936 prefs->SetString(prefs::kManagedModeLocalPassphrase, std::string()); |
| 937 prefs->SetString(prefs::kManagedModeLocalSalt, ""); | 937 prefs->SetString(prefs::kManagedModeLocalSalt, std::string()); |
| 938 } | 938 } |
| 939 } | 939 } |
| 940 | 940 |
| 941 // If we have urls specified by the first run master preferences use them | 941 // If we have urls specified by the first run master preferences use them |
| 942 // and nothing else. | 942 // and nothing else. |
| 943 if (browser_creator_ && startup_urls->empty()) { | 943 if (browser_creator_ && startup_urls->empty()) { |
| 944 if (!browser_creator_->first_run_tabs_.empty()) { | 944 if (!browser_creator_->first_run_tabs_.empty()) { |
| 945 std::vector<GURL>::iterator it = | 945 std::vector<GURL>::iterator it = |
| 946 browser_creator_->first_run_tabs_.begin(); | 946 browser_creator_->first_run_tabs_.begin(); |
| 947 while (it != browser_creator_->first_run_tabs_.end()) { | 947 while (it != browser_creator_->first_run_tabs_.end()) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 970 } | 970 } |
| 971 | 971 |
| 972 #if !defined(OS_WIN) || defined(USE_AURA) | 972 #if !defined(OS_WIN) || defined(USE_AURA) |
| 973 // static | 973 // static |
| 974 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( | 974 bool StartupBrowserCreatorImpl::OpenStartupURLsInExistingBrowser( |
| 975 Profile* profile, | 975 Profile* profile, |
| 976 const std::vector<GURL>& startup_urls) { | 976 const std::vector<GURL>& startup_urls) { |
| 977 return false; | 977 return false; |
| 978 } | 978 } |
| 979 #endif | 979 #endif |
| OLD | NEW |