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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 namespace extensions { | 58 namespace extensions { |
59 class EventRouter; | 59 class EventRouter; |
60 class UserScriptMaster; | 60 class UserScriptMaster; |
61 } | 61 } |
62 | 62 |
63 namespace fileapi { | 63 namespace fileapi { |
64 class FileSystemContext; | 64 class FileSystemContext; |
65 } | 65 } |
66 | 66 |
67 namespace history { | 67 namespace history { |
| 68 class TopSites; |
68 class ShortcutsBackend; | 69 class ShortcutsBackend; |
69 class TopSites; | |
70 } | 70 } |
71 | 71 |
72 namespace net { | 72 namespace net { |
73 class SSLConfigService; | 73 class SSLConfigService; |
74 } | 74 } |
75 | 75 |
76 namespace policy { | 76 namespace policy { |
77 class PolicyService; | 77 class PolicyService; |
78 class UserCloudPolicyManager; | |
79 } | 78 } |
80 | 79 |
81 class Profile : public content::BrowserContext { | 80 class Profile : public content::BrowserContext { |
82 public: | 81 public: |
83 // Profile services are accessed with the following parameter. This parameter | 82 // Profile services are accessed with the following parameter. This parameter |
84 // defines what the caller plans to do with the service. | 83 // defines what the caller plans to do with the service. |
85 // The caller is responsible for not performing any operation that would | 84 // The caller is responsible for not performing any operation that would |
86 // result in persistent implicit records while using an OffTheRecord profile. | 85 // result in persistent implicit records while using an OffTheRecord profile. |
87 // This flag allows the profile to perform an additional check. | 86 // This flag allows the profile to perform an additional check. |
88 // | 87 // |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // process may decide to shut down). | 242 // process may decide to shut down). |
244 // | 243 // |
245 // |access| defines what the caller plans to do with the service. See | 244 // |access| defines what the caller plans to do with the service. See |
246 // the ServiceAccessType definition above. | 245 // the ServiceAccessType definition above. |
247 virtual HistoryService* GetHistoryService(ServiceAccessType access) = 0; | 246 virtual HistoryService* GetHistoryService(ServiceAccessType access) = 0; |
248 | 247 |
249 // Similar to GetHistoryService(), but won't create the history service if it | 248 // Similar to GetHistoryService(), but won't create the history service if it |
250 // doesn't already exist. | 249 // doesn't already exist. |
251 virtual HistoryService* GetHistoryServiceWithoutCreating() = 0; | 250 virtual HistoryService* GetHistoryServiceWithoutCreating() = 0; |
252 | 251 |
253 // Returns the UserCloudPolicyManager (if any) that handles this profile's | |
254 // connection to the cloud-based management service. | |
255 virtual policy::UserCloudPolicyManager* GetUserCloudPolicyManager() = 0; | |
256 | |
257 // Returns the PolicyService that provides policies for this profile. | 252 // Returns the PolicyService that provides policies for this profile. |
258 virtual policy::PolicyService* GetPolicyService() = 0; | 253 virtual policy::PolicyService* GetPolicyService() = 0; |
259 | 254 |
260 // Retrieves a pointer to the PrefService that manages the preferences | 255 // Retrieves a pointer to the PrefService that manages the preferences |
261 // for this user profile. | 256 // for this user profile. |
262 virtual PrefService* GetPrefs() = 0; | 257 virtual PrefService* GetPrefs() = 0; |
263 | 258 |
264 // Retrieves a pointer to the PrefService that manages the preferences | 259 // Retrieves a pointer to the PrefService that manages the preferences |
265 // for OffTheRecord Profiles. This PrefService is lazily created the first | 260 // for OffTheRecord Profiles. This PrefService is lazily created the first |
266 // time that this method is called. | 261 // time that this method is called. |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 struct hash<Profile*> { | 432 struct hash<Profile*> { |
438 std::size_t operator()(Profile* const& p) const { | 433 std::size_t operator()(Profile* const& p) const { |
439 return reinterpret_cast<std::size_t>(p); | 434 return reinterpret_cast<std::size_t>(p); |
440 } | 435 } |
441 }; | 436 }; |
442 | 437 |
443 } // namespace BASE_HASH_NAMESPACE | 438 } // namespace BASE_HASH_NAMESPACE |
444 #endif | 439 #endif |
445 | 440 |
446 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ | 441 #endif // CHROME_BROWSER_PROFILES_PROFILE_H_ |
OLD | NEW |