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 21 matching lines...) Expand all Loading... |
32 class Observer { | 32 class Observer { |
33 public: | 33 public: |
34 // This method is called when profile is ready. If profile creation has been | 34 // This method is called when profile is ready. If profile creation has been |
35 // failed, method is called with |profile| equals to NULL. | 35 // failed, method is called with |profile| equals to NULL. |
36 virtual void OnProfileCreated(Profile* profile) = 0; | 36 virtual void OnProfileCreated(Profile* profile) = 0; |
37 }; | 37 }; |
38 | 38 |
39 ProfileManager(); | 39 ProfileManager(); |
40 virtual ~ProfileManager(); | 40 virtual ~ProfileManager(); |
41 | 41 |
42 // Invokes ShutdownSessionService() on all profiles. | 42 // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles. |
43 static void ShutdownSessionServices(); | 43 static void ShutdownSessionServices(); |
44 | 44 |
45 // Returns the default profile. This adds the profile to the | 45 // Returns the default profile. This adds the profile to the |
46 // ProfileManager if it doesn't already exist. This method returns NULL if | 46 // ProfileManager if it doesn't already exist. This method returns NULL if |
47 // the profile doesn't exist and we can't create it. | 47 // the profile doesn't exist and we can't create it. |
48 // The profile used can be overridden by using --login-profile on cros. | 48 // The profile used can be overridden by using --login-profile on cros. |
49 Profile* GetDefaultProfile(const FilePath& user_data_dir); | 49 Profile* GetDefaultProfile(const FilePath& user_data_dir); |
50 | 50 |
51 // Same as instance method but provides the default user_data_dir as well. | 51 // Same as instance method but provides the default user_data_dir as well. |
52 static Profile* GetDefaultProfile(); | 52 static Profile* GetDefaultProfile(); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 }; | 161 }; |
162 | 162 |
163 // Same as the ProfileManager, but doesn't initialize some services of the | 163 // Same as the ProfileManager, but doesn't initialize some services of the |
164 // profile. This one is useful in unittests. | 164 // profile. This one is useful in unittests. |
165 class ProfileManagerWithoutInit : public ProfileManager { | 165 class ProfileManagerWithoutInit : public ProfileManager { |
166 protected: | 166 protected: |
167 virtual void DoFinalInit(Profile*) {} | 167 virtual void DoFinalInit(Profile*) {} |
168 }; | 168 }; |
169 | 169 |
170 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 170 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |