Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(703)

Side by Side Diff: chrome/browser/profiles/profile_manager.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, use pure builder pattern. Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698