| 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 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 // profile has been loaded, we must pre-load a next one. | 701 // profile has been loaded, we must pre-load a next one. |
| 702 const std::string last_used_profile = | 702 const std::string last_used_profile = |
| 703 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); | 703 g_browser_process->local_state()->GetString(prefs::kProfileLastUsed); |
| 704 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || | 704 if (last_used_profile == profile_dir.BaseName().MaybeAsASCII() || |
| 705 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { | 705 last_used_profile == GetGuestProfilePath().BaseName().MaybeAsASCII()) { |
| 706 CreateProfileAsync(last_non_supervised_profile_path, | 706 CreateProfileAsync(last_non_supervised_profile_path, |
| 707 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, | 707 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, |
| 708 base::Unretained(this), | 708 base::Unretained(this), |
| 709 profile_dir, | 709 profile_dir, |
| 710 last_non_supervised_profile_path, | 710 last_non_supervised_profile_path, |
| 711 callback), | 711 CreateCallback()), |
| 712 base::string16(), | 712 base::string16(), |
| 713 base::string16(), | 713 base::string16(), |
| 714 std::string()); | 714 std::string()); |
| 715 return; | 715 return; |
| 716 } | 716 } |
| 717 #endif // defined(OS_MACOSX) | 717 #endif // defined(OS_MACOSX) |
| 718 | 718 |
| 719 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); | 719 FinishDeletingProfile(profile_dir, last_non_supervised_profile_path); |
| 720 } | 720 } |
| 721 | 721 |
| (...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); | 1394 FinishDeletingProfile(profile_to_delete_path, new_active_profile_path); |
| 1395 if (!original_callback.is_null()) | 1395 if (!original_callback.is_null()) |
| 1396 original_callback.Run(loaded_profile, status); | 1396 original_callback.Run(loaded_profile, status); |
| 1397 } | 1397 } |
| 1398 | 1398 |
| 1399 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1399 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1400 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1400 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1401 } | 1401 } |
| OLD | NEW |