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