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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 static Profile* GetLastUsedProfile(); | 101 static Profile* GetLastUsedProfile(); |
102 | 102 |
103 // Register the mapping of a directory to a profile name in Local State. | 103 // Register the mapping of a directory to a profile name in Local State. |
104 void RegisterProfileName(Profile* profile); | 104 void RegisterProfileName(Profile* profile); |
105 | 105 |
106 // Returns created profiles. Note, profiles order is NOT guaranteed to be | 106 // Returns created profiles. Note, profiles order is NOT guaranteed to be |
107 // related with the creation order. | 107 // related with the creation order. |
108 std::vector<Profile*> GetLoadedProfiles() const; | 108 std::vector<Profile*> GetLoadedProfiles() const; |
109 | 109 |
110 // NotificationObserver implementation. | 110 // NotificationObserver implementation. |
111 virtual void Observe(NotificationType type, | 111 virtual void Observe(int type, |
112 const NotificationSource& source, | 112 const NotificationSource& source, |
113 const NotificationDetails& details); | 113 const NotificationDetails& details); |
114 | 114 |
115 // BrowserList::Observer implementation. | 115 // BrowserList::Observer implementation. |
116 virtual void OnBrowserAdded(const Browser* browser); | 116 virtual void OnBrowserAdded(const Browser* browser); |
117 virtual void OnBrowserRemoved(const Browser* browser); | 117 virtual void OnBrowserRemoved(const Browser* browser); |
118 virtual void OnBrowserSetLastActive(const Browser* browser); | 118 virtual void OnBrowserSetLastActive(const Browser* browser); |
119 | 119 |
120 // ------------------ static utility functions ------------------- | 120 // ------------------ static utility functions ------------------- |
121 | 121 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 }; | 228 }; |
229 | 229 |
230 // 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 |
231 // profile. This one is useful in unittests. | 231 // profile. This one is useful in unittests. |
232 class ProfileManagerWithoutInit : public ProfileManager { | 232 class ProfileManagerWithoutInit : public ProfileManager { |
233 protected: | 233 protected: |
234 virtual void DoFinalInit(Profile*) {} | 234 virtual void DoFinalInit(Profile*) {} |
235 }; | 235 }; |
236 | 236 |
237 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ | 237 #endif // CHROME_BROWSER_PROFILES_PROFILE_MANAGER_H_ |
OLD | NEW |