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