| 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 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 883 base::Bind(&OnOpenWindowForNewProfile, | 883 base::Bind(&OnOpenWindowForNewProfile, |
| 884 desktop_type, | 884 desktop_type, |
| 885 callback), | 885 callback), |
| 886 name, | 886 name, |
| 887 icon_url, | 887 icon_url, |
| 888 is_managed); | 888 is_managed); |
| 889 } | 889 } |
| 890 | 890 |
| 891 // static | 891 // static |
| 892 void ProfileManager::RegisterPrefs(PrefRegistrySimple* registry) { | 892 void ProfileManager::RegisterPrefs(PrefRegistrySimple* registry) { |
| 893 registry->RegisterStringPref(prefs::kProfileLastUsed, ""); | 893 registry->RegisterStringPref(prefs::kProfileLastUsed, std::string()); |
| 894 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 894 registry->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
| 895 registry->RegisterListPref(prefs::kProfilesLastActive); | 895 registry->RegisterListPref(prefs::kProfilesLastActive); |
| 896 } | 896 } |
| 897 | 897 |
| 898 size_t ProfileManager::GetNumberOfProfiles() { | 898 size_t ProfileManager::GetNumberOfProfiles() { |
| 899 return GetProfileInfoCache().GetNumberOfProfiles(); | 899 return GetProfileInfoCache().GetNumberOfProfiles(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 bool ProfileManager::CompareProfilePathAndName( | 902 bool ProfileManager::CompareProfilePathAndName( |
| 903 const ProfileManager::ProfilePathAndName& pair1, | 903 const ProfileManager::ProfilePathAndName& pair1, |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 ProfileManager::ProfileInfo::ProfileInfo( | 1126 ProfileManager::ProfileInfo::ProfileInfo( |
| 1127 Profile* profile, | 1127 Profile* profile, |
| 1128 bool created) | 1128 bool created) |
| 1129 : profile(profile), | 1129 : profile(profile), |
| 1130 created(created) { | 1130 created(created) { |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 ProfileManager::ProfileInfo::~ProfileInfo() { | 1133 ProfileManager::ProfileInfo::~ProfileInfo() { |
| 1134 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1134 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
| 1135 } | 1135 } |
| OLD | NEW |