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