| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // Register multi-profile related preferences in Local State. | 148 // Register multi-profile related preferences in Local State. |
| 149 static void RegisterPrefs(PrefService* prefs); | 149 static void RegisterPrefs(PrefService* prefs); |
| 150 | 150 |
| 151 // Returns a ProfileInfoCache object which can be used to get information | 151 // Returns a ProfileInfoCache object which can be used to get information |
| 152 // about profiles without having to load them from disk. | 152 // about profiles without having to load them from disk. |
| 153 ProfileInfoCache& GetProfileInfoCache(); | 153 ProfileInfoCache& GetProfileInfoCache(); |
| 154 | 154 |
| 155 // Schedules the profile at the given path to be deleted on shutdown. | 155 // Schedules the profile at the given path to be deleted on shutdown. |
| 156 void ScheduleProfileForDeletion(const FilePath& profile_dir); | 156 void ScheduleProfileForDeletion(const FilePath& profile_dir); |
| 157 | 157 |
| 158 // Checks if multiple profiles is enabled. |
| 159 static bool IsMultipleProfilesEnabled(); |
| 160 |
| 158 protected: | 161 protected: |
| 159 // Does final initial actions. | 162 // Does final initial actions. |
| 160 virtual void DoFinalInit(Profile* profile); | 163 virtual void DoFinalInit(Profile* profile); |
| 161 | 164 |
| 162 private: | 165 private: |
| 163 friend class ExtensionEventRouterForwarderTest; | 166 friend class ExtensionEventRouterForwarderTest; |
| 164 | 167 |
| 165 // This struct contains information about profiles which are being loaded or | 168 // This struct contains information about profiles which are being loaded or |
| 166 // were loaded. | 169 // were loaded. |
| 167 struct ProfileInfo { | 170 struct ProfileInfo { |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 }; | 228 }; |
| 226 | 229 |
| 227 // Same as the ProfileManager, but doesn't initialize some services of the | 230 // Same as the ProfileManager, but doesn't initialize some services of the |
| 228 // profile. This one is useful in unittests. | 231 // profile. This one is useful in unittests. |
| 229 class ProfileManagerWithoutInit : public ProfileManager { | 232 class ProfileManagerWithoutInit : public ProfileManager { |
| 230 protected: | 233 protected: |
| 231 virtual void DoFinalInit(Profile*) {} | 234 virtual void DoFinalInit(Profile*) {} |
| 232 }; | 235 }; |
| 233 | 236 |
| 234 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 237 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
| OLD | NEW |