| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 EXIT_NORMAL, | 114 EXIT_NORMAL, |
| 115 | 115 |
| 116 // The exit was the result of the system shutting down. | 116 // The exit was the result of the system shutting down. |
| 117 EXIT_SESSION_ENDED, | 117 EXIT_SESSION_ENDED, |
| 118 | 118 |
| 119 EXIT_CRASHED, | 119 EXIT_CRASHED, |
| 120 }; | 120 }; |
| 121 | 121 |
| 122 class Delegate { | 122 class Delegate { |
| 123 public: | 123 public: |
| 124 virtual ~Delegate() {} | |
| 125 | |
| 126 // Called when creation of the profile is finished. | 124 // Called when creation of the profile is finished. |
| 127 virtual void OnProfileCreated(Profile* profile, | 125 virtual void OnProfileCreated(Profile* profile, |
| 128 bool success, | 126 bool success, |
| 129 bool is_new_profile) = 0; | 127 bool is_new_profile) = 0; |
| 130 }; | 128 }; |
| 131 | 129 |
| 132 // Key used to bind profile to the widget with which it is associated. | 130 // Key used to bind profile to the widget with which it is associated. |
| 133 static const char* const kProfileKey; | 131 static const char* const kProfileKey; |
| 134 | 132 |
| 135 Profile(); | 133 Profile(); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 struct hash<Profile*> { | 385 struct hash<Profile*> { |
| 388 std::size_t operator()(Profile* const& p) const { | 386 std::size_t operator()(Profile* const& p) const { |
| 389 return reinterpret_cast<std::size_t>(p); | 387 return reinterpret_cast<std::size_t>(p); |
| 390 } | 388 } |
| 391 }; | 389 }; |
| 392 | 390 |
| 393 } // namespace BASE_HASH_NAMESPACE | 391 } // namespace BASE_HASH_NAMESPACE |
| 394 #endif | 392 #endif |
| 395 | 393 |
| 396 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 394 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |