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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 | 814 |
815 profile_manager->CreateProfileAsync(new_path, | 815 profile_manager->CreateProfileAsync(new_path, |
816 base::Bind(&OnOpenWindowForNewProfile, | 816 base::Bind(&OnOpenWindowForNewProfile, |
817 desktop_type, | 817 desktop_type, |
818 callback), | 818 callback), |
819 name, | 819 name, |
820 icon_url); | 820 icon_url); |
821 } | 821 } |
822 | 822 |
823 // static | 823 // static |
824 void ProfileManager::RegisterPrefs(PrefService* prefs) { | 824 void ProfileManager::RegisterPrefs(PrefServiceSimple* prefs) { |
825 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); | 825 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); |
826 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 826 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
827 prefs->RegisterListPref(prefs::kProfilesLastActive); | 827 prefs->RegisterListPref(prefs::kProfilesLastActive); |
828 } | 828 } |
829 | 829 |
830 size_t ProfileManager::GetNumberOfProfiles() { | 830 size_t ProfileManager::GetNumberOfProfiles() { |
831 return GetProfileInfoCache().GetNumberOfProfiles(); | 831 return GetProfileInfoCache().GetNumberOfProfiles(); |
832 } | 832 } |
833 | 833 |
834 bool ProfileManager::CompareProfilePathAndName( | 834 bool ProfileManager::CompareProfilePathAndName( |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 ProfileManager::ProfileInfo::ProfileInfo( | 1044 ProfileManager::ProfileInfo::ProfileInfo( |
1045 Profile* profile, | 1045 Profile* profile, |
1046 bool created) | 1046 bool created) |
1047 : profile(profile), | 1047 : profile(profile), |
1048 created(created) { | 1048 created(created) { |
1049 } | 1049 } |
1050 | 1050 |
1051 ProfileManager::ProfileInfo::~ProfileInfo() { | 1051 ProfileManager::ProfileInfo::~ProfileInfo() { |
1052 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1052 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1053 } | 1053 } |
OLD | NEW |