Chromium Code Reviews| 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 // 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 | 182 |
| 183 // Returns a ProfileAttributesStorage object which can be used to get | 183 // Returns a ProfileAttributesStorage object which can be used to get |
| 184 // information about profiles without having to load them from disk. | 184 // information about profiles without having to load them from disk. |
| 185 ProfileAttributesStorage& GetProfileAttributesStorage(); | 185 ProfileAttributesStorage& GetProfileAttributesStorage(); |
| 186 | 186 |
| 187 // Returns a ProfileShortcut Manager that enables the caller to create | 187 // Returns a ProfileShortcut Manager that enables the caller to create |
| 188 // profile specfic desktop shortcuts. | 188 // profile specfic desktop shortcuts. |
| 189 ProfileShortcutManager* profile_shortcut_manager(); | 189 ProfileShortcutManager* profile_shortcut_manager(); |
| 190 | 190 |
| 191 #if !defined(OS_ANDROID) | 191 #if !defined(OS_ANDROID) |
| 192 // Less strict version of ScheduleProfileForDeletion(), silently fail if | |
| 193 // profile already marked for deletion. | |
| 194 bool MaybeScheduleProfileForDeletion(const base::FilePath& profile_dir, | |
|
achuithb
2016/05/12 22:33:59
comment should say something about the return valu
| |
| 195 const CreateCallback& callback); | |
| 196 | |
| 192 // Schedules the profile at the given path to be deleted on shutdown. If we're | 197 // Schedules the profile at the given path to be deleted on shutdown. If we're |
| 193 // deleting the last profile, a new one will be created in its place, and in | 198 // deleting the last profile, a new one will be created in its place, and in |
| 194 // that case the callback will be called when profile creation is complete. | 199 // that case the callback will be called when profile creation is complete. |
| 195 void ScheduleProfileForDeletion(const base::FilePath& profile_dir, | 200 void ScheduleProfileForDeletion(const base::FilePath& profile_dir, |
| 196 const CreateCallback& callback); | 201 const CreateCallback& callback); |
| 197 #endif | 202 #endif |
| 198 | 203 |
| 199 // Autoloads profiles if they are running background apps. | 204 // Autoloads profiles if they are running background apps. |
| 200 void AutoloadProfiles(); | 205 void AutoloadProfiles(); |
| 201 | 206 |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 404 class ProfileManagerWithoutInit : public ProfileManager { | 409 class ProfileManagerWithoutInit : public ProfileManager { |
| 405 public: | 410 public: |
| 406 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 411 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
| 407 | 412 |
| 408 protected: | 413 protected: |
| 409 void DoFinalInitForServices(Profile*, bool) override {} | 414 void DoFinalInitForServices(Profile*, bool) override {} |
| 410 void DoFinalInitLogging(Profile*) override {} | 415 void DoFinalInitLogging(Profile*) override {} |
| 411 }; | 416 }; |
| 412 | 417 |
| 413 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 418 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |