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 29 matching lines...) Expand all Loading... |
40 virtual void OnProfileCreated(Profile* profile) = 0; | 40 virtual void OnProfileCreated(Profile* profile) = 0; |
41 | 41 |
42 // If true, delete the observer after the profile has been created. Default | 42 // If true, delete the observer after the profile has been created. Default |
43 // is false. | 43 // is false. |
44 virtual bool DeleteAfterCreation() { return false; } | 44 virtual bool DeleteAfterCreation() { return false; } |
45 }; | 45 }; |
46 | 46 |
47 ProfileManager(); | 47 ProfileManager(); |
48 virtual ~ProfileManager(); | 48 virtual ~ProfileManager(); |
49 | 49 |
50 // Invokes ShutdownSessionService() on all profiles. | 50 // Invokes SessionServiceFactory::ShutdownForProfile() for all profiles. |
51 static void ShutdownSessionServices(); | 51 static void ShutdownSessionServices(); |
52 | 52 |
53 // Returns the default profile. This adds the profile to the | 53 // Returns the default profile. This adds the profile to the |
54 // ProfileManager if it doesn't already exist. This method returns NULL if | 54 // ProfileManager if it doesn't already exist. This method returns NULL if |
55 // the profile doesn't exist and we can't create it. | 55 // the profile doesn't exist and we can't create it. |
56 // The profile used can be overridden by using --login-profile on cros. | 56 // The profile used can be overridden by using --login-profile on cros. |
57 Profile* GetDefaultProfile(const FilePath& user_data_dir); | 57 Profile* GetDefaultProfile(const FilePath& user_data_dir); |
58 | 58 |
59 // Same as instance method but provides the default user_data_dir as well. | 59 // Same as instance method but provides the default user_data_dir as well. |
60 static Profile* GetDefaultProfile(); | 60 static Profile* GetDefaultProfile(); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 }; | 195 }; |
196 | 196 |
197 // Same as the ProfileManager, but doesn't initialize some services of the | 197 // Same as the ProfileManager, but doesn't initialize some services of the |
198 // profile. This one is useful in unittests. | 198 // profile. This one is useful in unittests. |
199 class ProfileManagerWithoutInit : public ProfileManager { | 199 class ProfileManagerWithoutInit : public ProfileManager { |
200 protected: | 200 protected: |
201 virtual void DoFinalInit(Profile*) {} | 201 virtual void DoFinalInit(Profile*) {} |
202 }; | 202 }; |
203 | 203 |
204 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 204 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |