Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Side by Side Diff: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h

Issue 1165323004: We should use UserID object to identify users instead of username. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" 14 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h"
15 #include "chrome/browser/policy/chrome_browser_policy_connector.h" 15 #include "chrome/browser/policy/chrome_browser_policy_connector.h"
16 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 16 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
17 17
18 class PrefRegistrySimple; 18 class PrefRegistrySimple;
19 class PrefService; 19 class PrefService;
20 20
21 namespace net { 21 namespace net {
22 class URLRequestContextGetter; 22 class URLRequestContextGetter;
23 } 23 }
24 24
25 namespace user_manager {
26 class UserID;
27 }
28
25 namespace policy { 29 namespace policy {
26 30
27 class AffiliatedCloudPolicyInvalidator; 31 class AffiliatedCloudPolicyInvalidator;
28 class AffiliatedInvalidationServiceProvider; 32 class AffiliatedInvalidationServiceProvider;
29 class AffiliatedRemoteCommandsInvalidator; 33 class AffiliatedRemoteCommandsInvalidator;
30 class ConsumerManagementService; 34 class ConsumerManagementService;
31 class DeviceCloudPolicyInitializer; 35 class DeviceCloudPolicyInitializer;
32 class DeviceLocalAccountPolicyService; 36 class DeviceLocalAccountPolicyService;
33 class DeviceManagementService; 37 class DeviceManagementService;
34 struct EnrollmentConfig; 38 struct EnrollmentConfig;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // stored in the lockbox, or DEVICE_MODE_CONSUMER if the lockbox has been 76 // stored in the lockbox, or DEVICE_MODE_CONSUMER if the lockbox has been
73 // locked empty, or DEVICE_MODE_UNKNOWN if the device has not been owned yet. 77 // locked empty, or DEVICE_MODE_UNKNOWN if the device has not been owned yet.
74 // For other OSes the function will always return DEVICE_MODE_CONSUMER. 78 // For other OSes the function will always return DEVICE_MODE_CONSUMER.
75 DeviceMode GetDeviceMode(); 79 DeviceMode GetDeviceMode();
76 80
77 // Get the enrollment configuration for the device as decided by various 81 // Get the enrollment configuration for the device as decided by various
78 // factors. See DeviceCloudPolicyInitializer::GetPrescribedEnrollmentConfig() 82 // factors. See DeviceCloudPolicyInitializer::GetPrescribedEnrollmentConfig()
79 // for details. 83 // for details.
80 EnrollmentConfig GetPrescribedEnrollmentConfig() const; 84 EnrollmentConfig GetPrescribedEnrollmentConfig() const;
81 85
82 // Works out the user affiliation by checking the given |user_name| against 86 // Works out the user affiliation by checking the given |user_id| against
83 // the installation attributes. 87 // the installation attributes.
84 UserAffiliation GetUserAffiliation(const std::string& user_name); 88 UserAffiliation GetUserAffiliation(const user_manager::UserID& user_id);
85 89
86 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() { 90 DeviceCloudPolicyManagerChromeOS* GetDeviceCloudPolicyManager() {
87 return device_cloud_policy_manager_; 91 return device_cloud_policy_manager_;
88 } 92 }
89 93
90 DeviceCloudPolicyInitializer* GetDeviceCloudPolicyInitializer() { 94 DeviceCloudPolicyInitializer* GetDeviceCloudPolicyInitializer() {
91 return device_cloud_policy_initializer_.get(); 95 return device_cloud_policy_initializer_.get();
92 } 96 }
93 97
94 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() { 98 DeviceLocalAccountPolicyService* GetDeviceLocalAccountPolicyService() {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_; 183 scoped_ptr<NetworkConfigurationUpdater> network_configuration_updater_;
180 184
181 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_; 185 base::WeakPtrFactory<BrowserPolicyConnectorChromeOS> weak_ptr_factory_;
182 186
183 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS); 187 DISALLOW_COPY_AND_ASSIGN(BrowserPolicyConnectorChromeOS);
184 }; 188 };
185 189
186 } // namespace policy 190 } // namespace policy
187 191
188 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_ 192 #endif // CHROME_BROWSER_CHROMEOS_POLICY_BROWSER_POLICY_CONNECTOR_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698