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 by calling into the profile's profile creation |
202 virtual Profile* CreateProfile(const FilePath& path); | 202 // method. Virtual so that unittests can return a TestingProfile instead |
| 203 // of the Profile's result. |
| 204 virtual Profile* CreateProfileHelper(const FilePath& path); |
| 205 |
| 206 // Creates a new profile asynchronously by calling into the profile's |
| 207 // asynchronous profile creation method. Virtual so that unittests can return |
| 208 // a TestingProfile instead of the Profile's result. |
| 209 virtual Profile* CreateProfileAsyncHelper(const FilePath& path, |
| 210 Delegate* delegate); |
203 | 211 |
204 private: | 212 private: |
205 friend class TestingProfileManager; | 213 friend class TestingProfileManager; |
206 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles); | 214 FRIEND_TEST(ProfileManagerBrowserTest, DeleteAllProfiles); |
207 | 215 |
208 // This struct contains information about profiles which are being loaded or | 216 // This struct contains information about profiles which are being loaded or |
209 // were loaded. | 217 // were loaded. |
210 struct ProfileInfo { | 218 struct ProfileInfo { |
211 ProfileInfo(Profile* profile, bool created) | 219 ProfileInfo(Profile* profile, bool created) |
212 : profile(profile), created(created) { | 220 : profile(profile), created(created) { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 class ProfileManagerWithoutInit : public ProfileManager { | 293 class ProfileManagerWithoutInit : public ProfileManager { |
286 public: | 294 public: |
287 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 295 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
288 | 296 |
289 protected: | 297 protected: |
290 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 298 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
291 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 299 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
292 }; | 300 }; |
293 | 301 |
294 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 302 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |