Chromium Code Reviews| 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/profiles/profile_manager.h" | 5 #include "chrome/browser/profiles/profile_manager.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 920 command_line->HasSwitch(switches::kSupervisedUserId); | 920 command_line->HasSwitch(switches::kSupervisedUserId); |
| 921 if (force_supervised_user_id) { | 921 if (force_supervised_user_id) { |
| 922 supervised_user_id = | 922 supervised_user_id = |
| 923 command_line->GetSwitchValueASCII(switches::kSupervisedUserId); | 923 command_line->GetSwitchValueASCII(switches::kSupervisedUserId); |
| 924 } | 924 } |
| 925 if (force_supervised_user_id || | 925 if (force_supervised_user_id || |
| 926 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { | 926 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { |
| 927 profile->GetPrefs()->SetString(prefs::kSupervisedUserId, | 927 profile->GetPrefs()->SetString(prefs::kSupervisedUserId, |
| 928 supervised_user_id); | 928 supervised_user_id); |
| 929 } | 929 } |
| 930 #if !defined(OS_ANDROID) | |
| 931 if (profile->IsNewProfile()) { | |
|
Peter Kasting
2016/11/20 07:32:09
Nit: No {}
tmartino
2016/11/21 00:27:34
Done
| |
| 932 profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomeUI, false); | |
| 933 } | |
| 934 #endif | |
| 930 } | 935 } |
| 931 | 936 |
| 932 void ProfileManager::RegisterTestingProfile(Profile* profile, | 937 void ProfileManager::RegisterTestingProfile(Profile* profile, |
| 933 bool add_to_storage, | 938 bool add_to_storage, |
| 934 bool start_deferred_task_runners) { | 939 bool start_deferred_task_runners) { |
| 935 RegisterProfile(profile, true); | 940 RegisterProfile(profile, true); |
| 936 if (add_to_storage) { | 941 if (add_to_storage) { |
| 937 InitProfileUserPrefs(profile); | 942 InitProfileUserPrefs(profile); |
| 938 AddProfileToStorage(profile); | 943 AddProfileToStorage(profile); |
| 939 } | 944 } |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1669 | 1674 |
| 1670 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1675 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1671 if (!original_callback.is_null()) | 1676 if (!original_callback.is_null()) |
| 1672 original_callback.Run(loaded_profile, status); | 1677 original_callback.Run(loaded_profile, status); |
| 1673 } | 1678 } |
| 1674 #endif // !defined(OS_ANDROID) | 1679 #endif // !defined(OS_ANDROID) |
| 1675 | 1680 |
| 1676 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1681 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1677 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1682 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1678 } | 1683 } |
| OLD | NEW |