Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 9 #pragma once |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 191 void RegisterTestingProfile(Profile* profile, bool addToCache); | 191 void RegisterTestingProfile(Profile* profile, bool addToCache); |
| 192 | 192 |
| 193 const FilePath& user_data_dir() const { return user_data_dir_; } | 193 const FilePath& user_data_dir() const { return user_data_dir_; } |
| 194 | 194 |
| 195 protected: | 195 protected: |
| 196 // Does final initial actions. | 196 // Does final initial actions. |
| 197 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); | 197 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); |
| 198 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); | 198 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); |
| 199 virtual void DoFinalInitLogging(Profile* profile); | 199 virtual void DoFinalInitLogging(Profile* profile); |
| 200 | 200 |
| 201 // Creates a new profile. Virtual so that unittests can return TestingProfile. | 201 // Creates a new profile. Virtual so that unittests can return a |
| 202 // TestingProfile. | |
| 202 virtual Profile* CreateProfile(const FilePath& path); | 203 virtual Profile* CreateProfile(const FilePath& path); |
| 203 | 204 |
| 205 // Creates a new profile asynchronously. Virtual so that unittests can return | |
| 206 // a TestingProfile. | |
| 207 virtual Profile* CreateAsyncProfile(const FilePath& path, | |
|
Miranda Callahan
2011/11/21 15:31:31
I think making an asynchronous creation method ana
rpetterson
2011/11/21 22:59:30
I see your point. I renamed the helper functions t
| |
| 208 Delegate* delegate); | |
| 209 | |
| 204 private: | 210 private: |
| 205 friend class TestingProfileManager; | 211 friend class TestingProfileManager; |
| 206 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles); | 212 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles); |
| 207 | 213 |
| 208 // This struct contains information about profiles which are being loaded or | 214 // This struct contains information about profiles which are being loaded or |
| 209 // were loaded. | 215 // were loaded. |
| 210 struct ProfileInfo { | 216 struct ProfileInfo { |
| 211 ProfileInfo(Profile* profile, bool created) | 217 ProfileInfo(Profile* profile, bool created) |
| 212 : profile(profile), created(created) { | 218 : profile(profile), created(created) { |
| 213 } | 219 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 class ProfileManagerWithoutInit : public ProfileManager { | 291 class ProfileManagerWithoutInit : public ProfileManager { |
| 286 public: | 292 public: |
| 287 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 293 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
| 288 | 294 |
| 289 protected: | 295 protected: |
| 290 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 296 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
| 291 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 297 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
| 292 }; | 298 }; |
| 293 | 299 |
| 294 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 300 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |