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

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 2487553002: Moving new First Run to use per-profile value, rather than simply checking IsChromeFirstRun. (Closed)
Patch Set: Addressing pkasting feedback Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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())
932 profile->GetPrefs()->SetBoolean(prefs::kHasSeenWelcomePage, false);
933 #endif
930 } 934 }
931 935
932 void ProfileManager::RegisterTestingProfile(Profile* profile, 936 void ProfileManager::RegisterTestingProfile(Profile* profile,
933 bool add_to_storage, 937 bool add_to_storage,
934 bool start_deferred_task_runners) { 938 bool start_deferred_task_runners) {
935 RegisterProfile(profile, true); 939 RegisterProfile(profile, true);
936 if (add_to_storage) { 940 if (add_to_storage) {
937 InitProfileUserPrefs(profile); 941 InitProfileUserPrefs(profile);
938 AddProfileToStorage(profile); 942 AddProfileToStorage(profile);
939 } 943 }
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 1673
1670 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); 1674 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path);
1671 if (!original_callback.is_null()) 1675 if (!original_callback.is_null())
1672 original_callback.Run(loaded_profile, status); 1676 original_callback.Run(loaded_profile, status);
1673 } 1677 }
1674 #endif // !defined(OS_ANDROID) 1678 #endif // !defined(OS_ANDROID)
1675 1679
1676 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1680 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1677 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1681 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1678 } 1682 }
OLDNEW
« no previous file with comments | « chrome/browser/prefs/browser_prefs.cc ('k') | chrome/browser/ui/startup/startup_browser_creator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698