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

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: Ready for review. Created 8 years 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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698