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 <list> | 10 #include <list> |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 249 // The profile used can be overridden by using --login-profile on cros. | 249 // The profile used can be overridden by using --login-profile on cros. |
| 250 Profile* GetActiveUserOrOffTheRecordProfileFromPath( | 250 Profile* GetActiveUserOrOffTheRecordProfileFromPath( |
| 251 const base::FilePath& user_data_dir); | 251 const base::FilePath& user_data_dir); |
| 252 | 252 |
| 253 // Adds a pre-existing Profile object to the set managed by this | 253 // Adds a pre-existing Profile object to the set managed by this |
| 254 // ProfileManager. This ProfileManager takes ownership of the Profile. | 254 // ProfileManager. This ProfileManager takes ownership of the Profile. |
| 255 // The Profile should not already be managed by this ProfileManager. | 255 // The Profile should not already be managed by this ProfileManager. |
| 256 // Returns true if the profile was added, false otherwise. | 256 // Returns true if the profile was added, false otherwise. |
| 257 bool AddProfile(Profile* profile); | 257 bool AddProfile(Profile* profile); |
| 258 | 258 |
| 259 // Synchronously Creates and returns a profile. This handles both the full | |
|
Alexei Svitkine (slow)
2015/02/19 14:44:59
Nit: Don't capitalize creates.
rkaplow
2015/02/19 15:42:51
Done.
| |
| 260 // creation the management. | |
|
Alexei Svitkine (slow)
2015/02/19 14:44:59
I don't understand this sentence. "This handles bo
rkaplow
2015/02/19 15:42:51
lost an "and" there in the editing. Added a bit mo
| |
| 261 Profile* CreateAndInitializeProfile(const base::FilePath& profile_dir); | |
| 262 | |
| 259 // Schedules the profile at the given path to be deleted on shutdown. | 263 // Schedules the profile at the given path to be deleted on shutdown. |
| 260 void FinishDeletingProfile(const base::FilePath& profile_dir); | 264 void FinishDeletingProfile(const base::FilePath& profile_dir); |
| 261 | 265 |
| 262 // Registers profile with given info. Returns pointer to created ProfileInfo | 266 // Registers profile with given info. Returns pointer to created ProfileInfo |
| 263 // entry. | 267 // entry. |
| 264 ProfileInfo* RegisterProfile(Profile* profile, bool created); | 268 ProfileInfo* RegisterProfile(Profile* profile, bool created); |
| 265 | 269 |
| 266 // Returns ProfileInfo associated with given |path|, registred earlier with | 270 // Returns ProfileInfo associated with given |path|, registred earlier with |
| 267 // RegisterProfile. | 271 // RegisterProfile. |
| 268 ProfileInfo* GetProfileInfoByPath(const base::FilePath& path) const; | 272 ProfileInfo* GetProfileInfoByPath(const base::FilePath& path) const; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 class ProfileManagerWithoutInit : public ProfileManager { | 364 class ProfileManagerWithoutInit : public ProfileManager { |
| 361 public: | 365 public: |
| 362 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); | 366 explicit ProfileManagerWithoutInit(const base::FilePath& user_data_dir); |
| 363 | 367 |
| 364 protected: | 368 protected: |
| 365 void DoFinalInitForServices(Profile*, bool) override {} | 369 void DoFinalInitForServices(Profile*, bool) override {} |
| 366 void DoFinalInitLogging(Profile*) override {} | 370 void DoFinalInitLogging(Profile*) override {} |
| 367 }; | 371 }; |
| 368 | 372 |
| 369 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 373 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |