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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 #endif | 201 #endif |
202 | 202 |
203 const FilePath& user_data_dir() const { return user_data_dir_; } | 203 const FilePath& user_data_dir() const { return user_data_dir_; } |
204 | 204 |
205 protected: | 205 protected: |
206 // Does final initial actions. | 206 // Does final initial actions. |
207 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); | 207 virtual void DoFinalInit(Profile* profile, bool go_off_the_record); |
208 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); | 208 virtual void DoFinalInitForServices(Profile* profile, bool go_off_the_record); |
209 virtual void DoFinalInitLogging(Profile* profile); | 209 virtual void DoFinalInitLogging(Profile* profile); |
210 | 210 |
211 // Creates a new profile. Virtual so that unittests can return TestingProfile. | 211 // Creates a new profile by calling into the profile's profile creation |
212 virtual Profile* CreateProfile(const FilePath& path); | 212 // method. Virtual so that unittests can return a TestingProfile instead |
| 213 // of the Profile's result. |
| 214 virtual Profile* CreateProfileHelper(const FilePath& path); |
| 215 |
| 216 // Creates a new profile asynchronously by calling into the profile's |
| 217 // asynchronous profile creation method. Virtual so that unittests can return |
| 218 // a TestingProfile instead of the Profile's result. |
| 219 virtual Profile* CreateProfileAsyncHelper(const FilePath& path, |
| 220 Delegate* delegate); |
213 | 221 |
214 private: | 222 private: |
215 friend class TestingProfileManager; | 223 friend class TestingProfileManager; |
216 FRIEND_TEST_ALL_PREFIXES(ProfileManagerBrowserTest, DeleteAllProfiles); | 224 FRIEND_TEST_ALL_PREFIXES(ProfileManagerBrowserTest, DeleteAllProfiles); |
217 | 225 |
218 // This struct contains information about profiles which are being loaded or | 226 // This struct contains information about profiles which are being loaded or |
219 // were loaded. | 227 // were loaded. |
220 struct ProfileInfo { | 228 struct ProfileInfo { |
221 ProfileInfo(Profile* profile, bool created) | 229 ProfileInfo(Profile* profile, bool created) |
222 : profile(profile), created(created) { | 230 : profile(profile), created(created) { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 class ProfileManagerWithoutInit : public ProfileManager { | 312 class ProfileManagerWithoutInit : public ProfileManager { |
305 public: | 313 public: |
306 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); | 314 explicit ProfileManagerWithoutInit(const FilePath& user_data_dir); |
307 | 315 |
308 protected: | 316 protected: |
309 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} | 317 virtual void DoFinalInitForServices(Profile*, bool) OVERRIDE {} |
310 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} | 318 virtual void DoFinalInitLogging(Profile*) OVERRIDE {} |
311 }; | 319 }; |
312 | 320 |
313 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 321 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |