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 <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 Loading... |
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 Loading... |
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 } |
OLD | NEW |