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 795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 profile_manager->CreateProfileAsync(new_path, | 806 profile_manager->CreateProfileAsync(new_path, |
807 base::Bind(&OnOpenWindowForNewProfile, | 807 base::Bind(&OnOpenWindowForNewProfile, |
808 desktop_type, | 808 desktop_type, |
809 callback), | 809 callback), |
810 name, | 810 name, |
811 icon_url, | 811 icon_url, |
812 is_managed); | 812 is_managed); |
813 } | 813 } |
814 | 814 |
815 // static | 815 // static |
816 void ProfileManager::RegisterPrefs(PrefService* prefs) { | 816 void ProfileManager::RegisterPrefs(PrefServiceSimple* prefs) { |
817 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); | 817 prefs->RegisterStringPref(prefs::kProfileLastUsed, ""); |
818 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); | 818 prefs->RegisterIntegerPref(prefs::kProfilesNumCreated, 1); |
819 prefs->RegisterListPref(prefs::kProfilesLastActive); | 819 prefs->RegisterListPref(prefs::kProfilesLastActive); |
820 } | 820 } |
821 | 821 |
822 size_t ProfileManager::GetNumberOfProfiles() { | 822 size_t ProfileManager::GetNumberOfProfiles() { |
823 return GetProfileInfoCache().GetNumberOfProfiles(); | 823 return GetProfileInfoCache().GetNumberOfProfiles(); |
824 } | 824 } |
825 | 825 |
826 bool ProfileManager::CompareProfilePathAndName( | 826 bool ProfileManager::CompareProfilePathAndName( |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 ProfileManager::ProfileInfo::ProfileInfo( | 1045 ProfileManager::ProfileInfo::ProfileInfo( |
1046 Profile* profile, | 1046 Profile* profile, |
1047 bool created) | 1047 bool created) |
1048 : profile(profile), | 1048 : profile(profile), |
1049 created(created) { | 1049 created(created) { |
1050 } | 1050 } |
1051 | 1051 |
1052 ProfileManager::ProfileInfo::~ProfileInfo() { | 1052 ProfileManager::ProfileInfo::~ProfileInfo() { |
1053 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); | 1053 ProfileDestroyer::DestroyProfileWhenAppropriate(profile.release()); |
1054 } | 1054 } |
OLD | NEW |