| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 virtual ~Delegate(); | 138 virtual ~Delegate(); |
| 139 | 139 |
| 140 // Called when creation of the profile is finished. | 140 // Called when creation of the profile is finished. |
| 141 virtual void OnProfileCreated(Profile* profile, | 141 virtual void OnProfileCreated(Profile* profile, |
| 142 bool success, | 142 bool success, |
| 143 bool is_new_profile) = 0; | 143 bool is_new_profile) = 0; |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 // Key used to bind profile to the widget with which it is associated. | 146 // Key used to bind profile to the widget with which it is associated. |
| 147 static const char kProfileKey[]; | 147 static const char kProfileKey[]; |
| 148 // Value representing no hosted domain in the kProfileHostedDomain preference. |
| 149 static const char kNoHostedDomainFound[]; |
| 148 | 150 |
| 149 Profile(); | 151 Profile(); |
| 150 virtual ~Profile(); | 152 virtual ~Profile(); |
| 151 | 153 |
| 152 // Profile prefs are registered as soon as the prefs are loaded for the first | 154 // Profile prefs are registered as soon as the prefs are loaded for the first |
| 153 // time. | 155 // time. |
| 154 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 156 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
| 155 | 157 |
| 156 // Create a new profile given a path. If |create_mode| is | 158 // Create a new profile given a path. If |create_mode| is |
| 157 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously. | 159 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously. |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 struct hash<Profile*> { | 414 struct hash<Profile*> { |
| 413 std::size_t operator()(Profile* const& p) const { | 415 std::size_t operator()(Profile* const& p) const { |
| 414 return reinterpret_cast<std::size_t>(p); | 416 return reinterpret_cast<std::size_t>(p); |
| 415 } | 417 } |
| 416 }; | 418 }; |
| 417 | 419 |
| 418 } // namespace BASE_HASH_NAMESPACE | 420 } // namespace BASE_HASH_NAMESPACE |
| 419 #endif | 421 #endif |
| 420 | 422 |
| 421 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 423 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |