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

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

Issue 15734006: Restructure user-creation flow and surface errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Removed log; patch for commit. Created 7 years, 6 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 // This class keeps track of the currently-active profiles in the runtime. 5 // This class keeps track of the currently-active profiles in the runtime.
6 6
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 8 #define CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
9 9
10 #include <list> 10 #include <list>
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // Directories are named "profile_1", "profile_2", etc., in sequence of 176 // Directories are named "profile_1", "profile_2", etc., in sequence of
177 // creation. (Because directories can be removed, however, it may be the case 177 // creation. (Because directories can be removed, however, it may be the case
178 // that at some point the list of numbered profiles is not continuous.) 178 // that at some point the list of numbered profiles is not continuous.)
179 // |callback| may be invoked multiple times (for CREATE_STATUS_INITIALIZED 179 // |callback| may be invoked multiple times (for CREATE_STATUS_INITIALIZED
180 // and CREATE_STATUS_CREATED) so binding parameters with bind::Passed() is 180 // and CREATE_STATUS_CREATED) so binding parameters with bind::Passed() is
181 // prohibited. 181 // prohibited.
182 static void CreateMultiProfileAsync( 182 static void CreateMultiProfileAsync(
183 const string16& name, 183 const string16& name,
184 const string16& icon_url, 184 const string16& icon_url,
185 const CreateCallback& callback, 185 const CreateCallback& callback,
186 chrome::HostDesktopType desktop_type,
187 bool is_managed); 186 bool is_managed);
188 187
189 // Register multi-profile related preferences in Local State. 188 // Register multi-profile related preferences in Local State.
190 static void RegisterPrefs(PrefRegistrySimple* registry); 189 static void RegisterPrefs(PrefRegistrySimple* registry);
191 190
192 // Returns a ProfileInfoCache object which can be used to get information 191 // Returns a ProfileInfoCache object which can be used to get information
193 // about profiles without having to load them from disk. 192 // about profiles without having to load them from disk.
194 ProfileInfoCache& GetProfileInfoCache(); 193 ProfileInfoCache& GetProfileInfoCache();
195 194
196 // Returns a ProfileShortcut Manager that enables the caller to create 195 // Returns a ProfileShortcut Manager that enables the caller to create
197 // profile specfic desktop shortcuts. 196 // profile specfic desktop shortcuts.
198 ProfileShortcutManager* profile_shortcut_manager(); 197 ProfileShortcutManager* profile_shortcut_manager();
199 198
200 // Schedules the profile at the given path to be deleted on shutdown. 199 // Schedules the profile at the given path to be deleted on shutdown. If we're
200 // deleting the last profile, a new one will be created in its place, and in
201 // that case the callback will be called when profile creation is complete.
201 void ScheduleProfileForDeletion(const base::FilePath& profile_dir, 202 void ScheduleProfileForDeletion(const base::FilePath& profile_dir,
202 chrome::HostDesktopType desktop_type); 203 const CreateCallback& callback);
203 204
204 // Checks if multiple profiles is enabled. 205 // Checks if multiple profiles is enabled.
205 static bool IsMultipleProfilesEnabled(); 206 static bool IsMultipleProfilesEnabled();
206 207
207 // Autoloads profiles if they are running background apps. 208 // Autoloads profiles if they are running background apps.
208 void AutoloadProfiles(); 209 void AutoloadProfiles();
209 210
210 // Sign-Out a profile against use until re-authentication. 211 // Sign-Out a profile against use until re-authentication.
211 void SignOutProfile(Profile* profile); 212 void SignOutProfile(Profile* profile);
212 213
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 class ProfileManagerWithoutInit : public ProfileManager { 370 class ProfileManagerWithoutInit : public ProfileManager {
370 public: 371 public:
371 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); 372 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir);
372 373
373 protected: 374 protected:
374 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} 375 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {}
375 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} 376 virtual void DoFinalInitLogging(Profile*) OVERRIDE {}
376 }; 377 };
377 378
378 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ 379 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/managed_mode/managed_user_registration_service.h ('k') | chrome/browser/profiles/profile_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698