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 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 // profile has been loaded, we must pre-load a next one. | 706 // profile has been loaded, we must pre-load a next one. |
707 const std::string last_used_profile = | 707 const std::string last_used_profile = |
708 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); | 708 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); |
709 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || | 709 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || |
710 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { | 710 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { |
711 CreateProfileAsync(last_non_supervised_profile_path, | 711 CreateProfileAsync(last_non_supervised_profile_path, |
712 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, | 712 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, |
713 base::Unretained(this), | 713 base::Unretained(this), |
714 profile_dir, | 714 profile_dir, |
715 last_non_supervised_profile_path, | 715 last_non_supervised_profile_path, |
716 CreateCallback()), | 716 callback), |
717 base::string16(), | 717 base::string16(), |
718 base::string16(), | 718 base::string16(), |
719 std::string()); | 719 std::string()); |
720 return; | 720 return; |
721 } | 721 } |
722 #endif // defined(OS_MACOSX) | 722 #endif // defined(OS_MACOSX) |
723 | 723 |
724 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); | 724 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); |
725 } | 725 } |
726 | 726 |
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 } | 1398 } |
1399 | 1399 |
1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1400 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
1401 if (!original_callback.is_null()) | 1401 if (!original_callback.is_null()) |
1402 original_callback.Run(loaded_profile, status); | 1402 original_callback.Run(loaded_profile, status); |
1403 } | 1403 } |
1404 | 1404 |
1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1405 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1406 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
1407 } | 1407 } |
OLD | NEW |