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

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

Issue 933503004: Always load signin profile on Chrome OS startup. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build. Created 5 years, 10 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 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 <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 } 805 }
806 806
807 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileAvatarIndex)) 807 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileAvatarIndex))
808 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarIndex, avatar_index); 808 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarIndex, avatar_index);
809 809
810 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileName)) 810 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileName))
811 profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); 811 profile->GetPrefs()->SetString(prefs::kProfileName, profile_name);
812 812
813 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 813 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
814 bool force_supervised_user_id = 814 bool force_supervised_user_id =
815 #if defined(OS_CHROMEOS)
816 g_browser_process->platform_part()
817 ->profile_helper()
818 ->GetSigninProfileDir() != profile->GetPath() &&
819 #endif
815 command_line->HasSwitch(switches::kSupervisedUserId); 820 command_line->HasSwitch(switches::kSupervisedUserId);
816 if (force_supervised_user_id) { 821 if (force_supervised_user_id) {
817 supervised_user_id = 822 supervised_user_id =
818 command_line->GetSwitchValueASCII(switches::kSupervisedUserId); 823 command_line->GetSwitchValueASCII(switches::kSupervisedUserId);
819 } 824 }
820 if (force_supervised_user_id || 825 if (force_supervised_user_id ||
821 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) { 826 !profile->GetPrefs()->HasPrefPath(prefs::kSupervisedUserId)) {
822 profile->GetPrefs()->SetString(prefs::kSupervisedUserId, 827 profile->GetPrefs()->SetString(prefs::kSupervisedUserId,
823 supervised_user_id); 828 supervised_user_id);
824 } 829 }
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); 1404 last_non_supervised_profile_path.BaseName().MaybeAsASCII());
1400 FinishDeletingProfile(profile_to_delete_path); 1405 FinishDeletingProfile(profile_to_delete_path);
1401 } 1406 }
1402 } 1407 }
1403 } 1408 }
1404 #endif 1409 #endif
1405 1410
1406 ProfileManagerWithoutInit::ProfileManagerWithoutInit( 1411 ProfileManagerWithoutInit::ProfileManagerWithoutInit(
1407 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { 1412 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) {
1408 } 1413 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698