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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 EXIT_CRASHED, | 119 EXIT_CRASHED, |
120 }; | 120 }; |
121 | 121 |
122 class Delegate { | 122 class Delegate { |
123 public: | 123 public: |
124 // Called when creation of the profile is finished. | 124 // Called when creation of the profile is finished. |
125 virtual void OnProfileCreated(Profile* profile, | 125 virtual void OnProfileCreated(Profile* profile, |
126 bool success, | 126 bool success, |
127 bool is_new_profile) = 0; | 127 bool is_new_profile) = 0; |
| 128 |
| 129 protected: |
| 130 virtual ~Delegate() { } |
128 }; | 131 }; |
129 | 132 |
130 // Key used to bind profile to the widget with which it is associated. | 133 // Key used to bind profile to the widget with which it is associated. |
131 static const char* const kProfileKey; | 134 static const char* const kProfileKey; |
132 | 135 |
133 Profile(); | 136 Profile(); |
134 virtual ~Profile() {} | 137 virtual ~Profile() {} |
135 | 138 |
136 // Profile prefs are registered as soon as the prefs are loaded for the first | 139 // Profile prefs are registered as soon as the prefs are loaded for the first |
137 // time. | 140 // time. |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 struct hash<Profile*> { | 388 struct hash<Profile*> { |
386 std::size_t operator()(Profile* const& p) const { | 389 std::size_t operator()(Profile* const& p) const { |
387 return reinterpret_cast<std::size_t>(p); | 390 return reinterpret_cast<std::size_t>(p); |
388 } | 391 } |
389 }; | 392 }; |
390 | 393 |
391 } // namespace BASE_HASH_NAMESPACE | 394 } // namespace BASE_HASH_NAMESPACE |
392 #endif | 395 #endif |
393 | 396 |
394 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 397 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |