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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 } | 774 } |
775 | 775 |
776 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileAvatarIndex)) | 776 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileAvatarIndex)) |
777 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarIndex, avatar_index); | 777 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarIndex, avatar_index); |
778 | 778 |
779 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileName)) | 779 if (!profile->GetPrefs()->HasPrefPath(prefs::kProfileName)) |
780 profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); | 780 profile->GetPrefs()->SetString(prefs::kProfileName, profile_name); |
781 | 781 |
782 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 782 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
783 bool force_managed_user_id = | 783 bool force_managed_user_id = |
| 784 #if defined(OS_CHROMEOS) |
| 785 g_browser_process->platform_part()-> |
| 786 profile_helper()->GetSigninProfileDir() != profile->GetPath() && |
| 787 #endif |
784 command_line->HasSwitch(switches::kManagedUserId); | 788 command_line->HasSwitch(switches::kManagedUserId); |
785 if (force_managed_user_id) { | 789 if (force_managed_user_id) { |
786 managed_user_id = | 790 managed_user_id = |
787 command_line->GetSwitchValueASCII(switches::kManagedUserId); | 791 command_line->GetSwitchValueASCII(switches::kManagedUserId); |
788 } | 792 } |
789 if (force_managed_user_id || | 793 if (force_managed_user_id || |
790 !profile->GetPrefs()->HasPrefPath(prefs::kManagedUserId)) { | 794 !profile->GetPrefs()->HasPrefPath(prefs::kManagedUserId)) { |
791 profile->GetPrefs()->SetString(prefs::kManagedUserId, managed_user_id); | 795 profile->GetPrefs()->SetString(prefs::kManagedUserId, managed_user_id); |
792 } | 796 } |
793 } | 797 } |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 last_non_managed_profile_path.BaseName().MaybeAsASCII()); | 1290 last_non_managed_profile_path.BaseName().MaybeAsASCII()); |
1287 FinishDeletingProfile(profile_to_delete_path); | 1291 FinishDeletingProfile(profile_to_delete_path); |
1288 } | 1292 } |
1289 } | 1293 } |
1290 } | 1294 } |
1291 #endif | 1295 #endif |
1292 | 1296 |
1293 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1297 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1294 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1298 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1295 } | 1299 } |
OLD | NEW |