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 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // Retrieves a pointer to the AutocompleteClassifier associated with this | 255 // Retrieves a pointer to the AutocompleteClassifier associated with this |
256 // profile. The AutocompleteClassifier is lazily created the first time that | 256 // profile. The AutocompleteClassifier is lazily created the first time that |
257 // this method is called. | 257 // this method is called. |
258 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; | 258 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; |
259 | 259 |
260 // Returns the ShortcutsBackend for this profile. This is owned by | 260 // Returns the ShortcutsBackend for this profile. This is owned by |
261 // the Profile and created on the first call. Callers that outlive the life of | 261 // the Profile and created on the first call. Callers that outlive the life of |
262 // this profile need to be sure they refcount the returned value. | 262 // this profile need to be sure they refcount the returned value. |
263 virtual history::ShortcutsBackend* GetShortcutsBackend() = 0; | 263 virtual history::ShortcutsBackend* GetShortcutsBackend() = 0; |
264 | 264 |
265 // Returns the WebDataService for this profile. This is owned by | |
266 // the Profile. Callers that outlive the life of this profile need to be | |
267 // sure they refcount the returned value. | |
268 // | |
269 // |access| defines what the caller plans to do with the service. See | |
270 // the ServiceAccessType definition above. | |
271 virtual WebDataService* GetWebDataService(ServiceAccessType access) = 0; | |
272 | |
273 // Similar to GetWebDataService(), but won't create the web data service if it | |
274 // doesn't already exist. | |
275 virtual WebDataService* GetWebDataServiceWithoutCreating() = 0; | |
276 | 265 |
277 // Retrieves a pointer to the PrefService that manages the preferences | 266 // Retrieves a pointer to the PrefService that manages the preferences |
278 // for this user profile. The PrefService is lazily created the first | 267 // for this user profile. The PrefService is lazily created the first |
279 // time that this method is called. | 268 // time that this method is called. |
280 virtual PrefService* GetPrefs() = 0; | 269 virtual PrefService* GetPrefs() = 0; |
281 | 270 |
282 // Retrieves a pointer to the PrefService that manages the preferences | 271 // Retrieves a pointer to the PrefService that manages the preferences |
283 // for OffTheRecord Profiles. This PrefService is lazily created the first | 272 // for OffTheRecord Profiles. This PrefService is lazily created the first |
284 // time that this method is called. | 273 // time that this method is called. |
285 virtual PrefService* GetOffTheRecordPrefs() = 0; | 274 virtual PrefService* GetOffTheRecordPrefs() = 0; |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 struct hash<Profile*> { | 446 struct hash<Profile*> { |
458 std::size_t operator()(Profile* const& p) const { | 447 std::size_t operator()(Profile* const& p) const { |
459 return reinterpret_cast<std::size_t>(p); | 448 return reinterpret_cast<std::size_t>(p); |
460 } | 449 } |
461 }; | 450 }; |
462 | 451 |
463 } // namespace BASE_HASH_NAMESPACE | 452 } // namespace BASE_HASH_NAMESPACE |
464 #endif | 453 #endif |
465 | 454 |
466 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 455 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |