| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // process may decide to shut down). | 247 // process may decide to shut down). |
| 248 // | 248 // |
| 249 // |access| defines what the caller plans to do with the service. See | 249 // |access| defines what the caller plans to do with the service. See |
| 250 // the ServiceAccessType definition above. | 250 // the ServiceAccessType definition above. |
| 251 virtual HistoryService* GetHistoryService(ServiceAccessType access) = 0; | 251 virtual HistoryService* GetHistoryService(ServiceAccessType access) = 0; |
| 252 | 252 |
| 253 // Similar to GetHistoryService(), but won't create the history service if it | 253 // Similar to GetHistoryService(), but won't create the history service if it |
| 254 // doesn't already exist. | 254 // doesn't already exist. |
| 255 virtual HistoryService* GetHistoryServiceWithoutCreating() = 0; | 255 virtual HistoryService* GetHistoryServiceWithoutCreating() = 0; |
| 256 | 256 |
| 257 // Returns the ShortcutsBackend for this profile. This is owned by | |
| 258 // the Profile and created on the first call. Callers that outlive the life of | |
| 259 // this profile need to be sure they refcount the returned value. | |
| 260 virtual history::ShortcutsBackend* GetShortcutsBackend() = 0; | |
| 261 | |
| 262 // Returns the PolicyService that provides policies for this profile. | 257 // Returns the PolicyService that provides policies for this profile. |
| 263 virtual policy::PolicyService* GetPolicyService() = 0; | 258 virtual policy::PolicyService* GetPolicyService() = 0; |
| 264 | 259 |
| 265 // Retrieves a pointer to the PrefService that manages the preferences | 260 // Retrieves a pointer to the PrefService that manages the preferences |
| 266 // for this user profile. | 261 // for this user profile. |
| 267 virtual PrefService* GetPrefs() = 0; | 262 virtual PrefService* GetPrefs() = 0; |
| 268 | 263 |
| 269 // Retrieves a pointer to the PrefService that manages the preferences | 264 // Retrieves a pointer to the PrefService that manages the preferences |
| 270 // for OffTheRecord Profiles. This PrefService is lazily created the first | 265 // for OffTheRecord Profiles. This PrefService is lazily created the first |
| 271 // time that this method is called. | 266 // time that this method is called. |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 struct hash<Profile*> { | 439 struct hash<Profile*> { |
| 445 std::size_t operator()(Profile* const& p) const { | 440 std::size_t operator()(Profile* const& p) const { |
| 446 return reinterpret_cast<std::size_t>(p); | 441 return reinterpret_cast<std::size_t>(p); |
| 447 } | 442 } |
| 448 }; | 443 }; |
| 449 | 444 |
| 450 } // namespace BASE_HASH_NAMESPACE | 445 } // namespace BASE_HASH_NAMESPACE |
| 451 #endif | 446 #endif |
| 452 | 447 |
| 453 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 448 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
| OLD | NEW |