| 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 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 base::UTF8ToUTF16(profiles::GetDefaultAvatarIconUrl(avatar_index)) : | 668 base::UTF8ToUTF16(profiles::GetDefaultAvatarIconUrl(avatar_index)) : |
| 669 base::string16(); | 669 base::string16(); |
| 670 base::string16 new_profile_name = is_new_avatar_menu ? | 670 base::string16 new_profile_name = is_new_avatar_menu ? |
| 671 cache.ChooseNameForNewProfile(avatar_index) : base::string16(); | 671 cache.ChooseNameForNewProfile(avatar_index) : base::string16(); |
| 672 | 672 |
| 673 CreateProfileAsync(new_path, | 673 CreateProfileAsync(new_path, |
| 674 callback, | 674 callback, |
| 675 new_profile_name, | 675 new_profile_name, |
| 676 new_avatar_url, | 676 new_avatar_url, |
| 677 std::string()); | 677 std::string()); |
| 678 |
| 679 ProfileMetrics::LogProfileAddNewUser( |
| 680 ProfileMetrics::ADD_NEW_USER_LAST_DELETED); |
| 678 } else { | 681 } else { |
| 679 // On the Mac, the browser process is not killed when all browser windows | 682 // On the Mac, the browser process is not killed when all browser windows |
| 680 // are closed, so just in case we are deleting the active profile, and no | 683 // are closed, so just in case we are deleting the active profile, and no |
| 681 // other profile has been loaded, we must pre-load a next one. | 684 // other profile has been loaded, we must pre-load a next one. |
| 682 #if defined(OS_MACOSX) | 685 #if defined(OS_MACOSX) |
| 683 CreateProfileAsync(last_non_supervised_profile_path, | 686 CreateProfileAsync(last_non_supervised_profile_path, |
| 684 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, | 687 base::Bind(&ProfileManager::OnNewActiveProfileLoaded, |
| 685 base::Unretained(this), | 688 base::Unretained(this), |
| 686 profile_dir, | 689 profile_dir, |
| 687 last_non_supervised_profile_path, | 690 last_non_supervised_profile_path, |
| (...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); | 1304 last_non_supervised_profile_path.BaseName().MaybeAsASCII()); |
| 1302 FinishDeletingProfile(profile_to_delete_path); | 1305 FinishDeletingProfile(profile_to_delete_path); |
| 1303 } | 1306 } |
| 1304 } | 1307 } |
| 1305 } | 1308 } |
| 1306 #endif | 1309 #endif |
| 1307 | 1310 |
| 1308 ProfileManagerWithoutInit::ProfileManagerWithoutInit( | 1311 ProfileManagerWithoutInit::ProfileManagerWithoutInit( |
| 1309 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { | 1312 const base::FilePath& user_data_dir) : ProfileManager(user_data_dir) { |
| 1310 } | 1313 } |
| OLD | NEW |