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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 }; | 140 }; |
141 | 141 |
142 // Key used to bind profile to the widget with which it is associated. | 142 // Key used to bind profile to the widget with which it is associated. |
143 static const char kProfileKey[]; | 143 static const char kProfileKey[]; |
144 | 144 |
145 Profile(); | 145 Profile(); |
146 virtual ~Profile(); | 146 virtual ~Profile(); |
147 | 147 |
148 // Profile prefs are registered as soon as the prefs are loaded for the first | 148 // Profile prefs are registered as soon as the prefs are loaded for the first |
149 // time. | 149 // time. |
150 static void RegisterUserPrefs(user_prefs::PrefRegistrySyncable* registry); | 150 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
151 | 151 |
152 // Gets task runner for I/O operations associated with |profile|. | 152 // Gets task runner for I/O operations associated with |profile|. |
153 static scoped_refptr<base::SequencedTaskRunner> GetTaskRunnerForProfile( | 153 static scoped_refptr<base::SequencedTaskRunner> GetTaskRunnerForProfile( |
154 Profile* profile); | 154 Profile* profile); |
155 | 155 |
156 // Create a new profile given a path. If |create_mode| is | 156 // Create a new profile given a path. If |create_mode| is |
157 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously. | 157 // CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously. |
158 static Profile* CreateProfile(const base::FilePath& path, | 158 static Profile* CreateProfile(const base::FilePath& path, |
159 Delegate* delegate, | 159 Delegate* delegate, |
160 CreateMode create_mode); | 160 CreateMode create_mode); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 struct hash<Profile*> { | 403 struct hash<Profile*> { |
404 std::size_t operator()(Profile* const& p) const { | 404 std::size_t operator()(Profile* const& p) const { |
405 return reinterpret_cast<std::size_t>(p); | 405 return reinterpret_cast<std::size_t>(p); |
406 } | 406 } |
407 }; | 407 }; |
408 | 408 |
409 } // namespace BASE_HASH_NAMESPACE | 409 } // namespace BASE_HASH_NAMESPACE |
410 #endif | 410 #endif |
411 | 411 |
412 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 412 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |