OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 gathers state related to a single user profile. | 5 // This class gathers state related to a single user profile. |
6 | 6 |
7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ | 7 #ifndef CHROME_BROWSER_PROFILES_PROFILE_H_ |
8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ | 8 #define CHROME_BROWSER_PROFILES_PROFILE_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // The exit was the result of the system shutting down. | 127 // The exit was the result of the system shutting down. |
128 EXIT_SESSION_ENDED, | 128 EXIT_SESSION_ENDED, |
129 | 129 |
130 EXIT_CRASHED, | 130 EXIT_CRASHED, |
131 }; | 131 }; |
132 | 132 |
133 class Delegate { | 133 class Delegate { |
134 public: | 134 public: |
135 virtual ~Delegate(); | 135 virtual ~Delegate(); |
136 | 136 |
| 137 // Called when preferences for the profile have been loaded, but before all |
| 138 // the profile services have been initialized. |
| 139 virtual void OnPrefsLoaded(Profile* profile) = 0; |
| 140 |
137 // Called when creation of the profile is finished. | 141 // Called when creation of the profile is finished. |
138 virtual void OnProfileCreated(Profile* profile, | 142 virtual void OnProfileCreated(Profile* profile, |
139 bool success, | 143 bool success, |
140 bool is_new_profile) = 0; | 144 bool is_new_profile) = 0; |
141 }; | 145 }; |
142 | 146 |
143 // Key used to bind profile to the widget with which it is associated. | 147 // Key used to bind profile to the widget with which it is associated. |
144 static const char kProfileKey[]; | 148 static const char kProfileKey[]; |
145 | 149 |
146 Profile(); | 150 Profile(); |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 struct hash<Profile*> { | 411 struct hash<Profile*> { |
408 std::size_t operator()(Profile* const& p) const { | 412 std::size_t operator()(Profile* const& p) const { |
409 return reinterpret_cast<std::size_t>(p); | 413 return reinterpret_cast<std::size_t>(p); |
410 } | 414 } |
411 }; | 415 }; |
412 | 416 |
413 } // namespace BASE_HASH_NAMESPACE | 417 } // namespace BASE_HASH_NAMESPACE |
414 #endif | 418 #endif |
415 | 419 |
416 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 420 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |