| 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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 // Retrieves a pointer to the AutocompleteClassifier associated with this | 270 // Retrieves a pointer to the AutocompleteClassifier associated with this |
| 271 // profile. The AutocompleteClassifier is lazily created the first time that | 271 // profile. The AutocompleteClassifier is lazily created the first time that |
| 272 // this method is called. | 272 // this method is called. |
| 273 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; | 273 virtual AutocompleteClassifier* GetAutocompleteClassifier() = 0; |
| 274 | 274 |
| 275 // Returns the ShortcutsBackend for this profile. This is owned by | 275 // Returns the ShortcutsBackend for this profile. This is owned by |
| 276 // the Profile and created on the first call. Callers that outlive the life of | 276 // the Profile and created on the first call. Callers that outlive the life of |
| 277 // this profile need to be sure they refcount the returned value. | 277 // this profile need to be sure they refcount the returned value. |
| 278 virtual history::ShortcutsBackend* GetShortcutsBackend() = 0; | 278 virtual history::ShortcutsBackend* GetShortcutsBackend() = 0; |
| 279 | 279 |
| 280 // Returns the WebDataService for this profile. This is owned by | |
| 281 // the Profile. Callers that outlive the life of this profile need to be | |
| 282 // sure they refcount the returned value. | |
| 283 // | |
| 284 // |access| defines what the caller plans to do with the service. See | |
| 285 // the ServiceAccessType definition above. | |
| 286 virtual WebDataService* GetWebDataService(ServiceAccessType access) = 0; | |
| 287 | |
| 288 // Similar to GetWebDataService(), but won't create the web data service if it | |
| 289 // doesn't already exist. | |
| 290 virtual WebDataService* GetWebDataServiceWithoutCreating() = 0; | |
| 291 | 280 |
| 292 // Retrieves a pointer to the PrefService that manages the preferences | 281 // Retrieves a pointer to the PrefService that manages the preferences |
| 293 // for this user profile. The PrefService is lazily created the first | 282 // for this user profile. The PrefService is lazily created the first |
| 294 // time that this method is called. | 283 // time that this method is called. |
| 295 virtual PrefService* GetPrefs() = 0; | 284 virtual PrefService* GetPrefs() = 0; |
| 296 | 285 |
| 297 // Retrieves a pointer to the PrefService that manages the preferences | 286 // Retrieves a pointer to the PrefService that manages the preferences |
| 298 // for OffTheRecord Profiles. This PrefService is lazily created the first | 287 // for OffTheRecord Profiles. This PrefService is lazily created the first |
| 299 // time that this method is called. | 288 // time that this method is called. |
| 300 virtual PrefService* GetOffTheRecordPrefs() = 0; | 289 virtual PrefService* GetOffTheRecordPrefs() = 0; |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 struct hash<Profile*> { | 468 struct hash<Profile*> { |
| 480 std::size_t operator()(Profile* const& p) const { | 469 std::size_t operator()(Profile* const& p) const { |
| 481 return reinterpret_cast<std::size_t>(p); | 470 return reinterpret_cast<std::size_t>(p); |
| 482 } | 471 } |
| 483 }; | 472 }; |
| 484 | 473 |
| 485 } // namespace BASE_HASH_NAMESPACE | 474 } // namespace BASE_HASH_NAMESPACE |
| 486 #endif | 475 #endif |
| 487 | 476 |
| 488 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 477 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |