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 <set> | 5 #include <set> |
6 | 6 |
7 #include "chrome/browser/profiles/profile_manager.h" | 7 #include "chrome/browser/profiles/profile_manager.h" |
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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 profile_manager->CreateProfileAsync(new_path, | 822 profile_manager->CreateProfileAsync(new_path, |
823 base::Bind(&OnOpenWindowForNewProfile, | 823 base::Bind(&OnOpenWindowForNewProfile, |
824 desktop_type, | 824 desktop_type, |
825 callback), | 825 callback), |
826 name, | 826 name, |
827 icon_url, | 827 icon_url, |
828 is_managed); | 828 is_managed); |
829 } | 829 } |
830 | 830 |
831 // static | 831 // static |
832 void ProfileManager::RegisterPrefs(PrefService* prefs) { | 832 void ProfileManager::RegisterPrefs(PrefServiceSimple* prefs) { |
833 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); | 833 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); |
834 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 834 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
835 prefs->RegisterListPref(prefs::kProfilesLastActive); | 835 prefs->RegisterListPref(prefs::kProfilesLastActive); |
836 } | 836 } |
837 | 837 |
838 size_t ProfileManager::GetNumberOfProfiles() { | 838 size_t ProfileManager::GetNumberOfProfiles() { |
839 return GetProfileInfoCache().GetNumberOfProfiles(); | 839 return GetProfileInfoCache().GetNumberOfProfiles(); |
840 } | 840 } |
841 | 841 |
842 bool ProfileManager::CompareProfilePathAndName( | 842 bool ProfileManager::CompareProfilePathAndName( |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 ProfileManager::ProfileInfo::ProfileInfo( | 1061 ProfileManager::ProfileInfo::ProfileInfo( |
1062 Profile* profile, | 1062 Profile* profile, |
1063 bool created) | 1063 bool created) |
1064 : profile(profile), | 1064 : profile(profile), |
1065 created(created) { | 1065 created(created) { |
1066 } | 1066 } |
1067 | 1067 |
1068 ProfileManager::ProfileInfo::~ProfileInfo() { | 1068 ProfileManager::ProfileInfo::~ProfileInfo() { |
1069 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1069 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1070 } | 1070 } |
OLD | NEW |