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

Unified Diff: chrome/browser/policy/device_management_backend_impl.cc

Issue 7785032: Revert 98987 - Pass user_affiliation request parameter on user cloud policy requests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/device_management_backend_impl.cc
===================================================================
--- chrome/browser/policy/device_management_backend_impl.cc (revision 98988)
+++ chrome/browser/policy/device_management_backend_impl.cc (working copy)
@@ -34,8 +34,6 @@
const char DeviceManagementBackendImpl::kParamOAuthToken[] = "oauth_token";
const char DeviceManagementBackendImpl::kParamPlatform[] = "platform";
const char DeviceManagementBackendImpl::kParamRequest[] = "request";
-const char DeviceManagementBackendImpl::kParamUserAffiliation[] =
- "user_affiliation";
// String constants for the device and app type we report to the server.
const char DeviceManagementBackendImpl::kValueAppType[] = "Chrome";
@@ -44,9 +42,6 @@
const char DeviceManagementBackendImpl::kValueRequestRegister[] = "register";
const char DeviceManagementBackendImpl::kValueRequestUnregister[] =
"unregister";
-const char DeviceManagementBackendImpl::kValueUserAffiliationManaged[] =
- "managed";
-const char DeviceManagementBackendImpl::kValueUserAffiliationNone[] = "none";
namespace {
@@ -76,6 +71,7 @@
const int kPendingApprovalLegacy = 491;
const int kDeviceNotFoundLegacy = 901;
+
#if defined(OS_CHROMEOS)
// Machine info keys.
const char kMachineInfoHWClass[] = "hardware_class";
@@ -388,7 +384,6 @@
DeviceManagementBackendImpl* backend_impl,
const std::string& device_management_token,
const std::string& device_id,
- const std::string& user_affiliation,
const em::DevicePolicyRequest& request,
DeviceManagementBackend::DevicePolicyResponseDelegate* delegate)
: DeviceManagementJobBase(
@@ -397,8 +392,6 @@
device_id),
delegate_(delegate) {
SetDeviceManagementToken(device_management_token);
- SetQueryParam(DeviceManagementBackendImpl::kParamUserAffiliation,
- user_affiliation);
em::DeviceManagementRequest request_wrapper;
request_wrapper.mutable_policy_request()->CopyFrom(request);
SetPayload(request_wrapper);
@@ -545,27 +538,12 @@
void DeviceManagementBackendImpl::ProcessPolicyRequest(
const std::string& device_management_token,
const std::string& device_id,
- CloudPolicyDataStore::UserAffiliation affiliation,
const em::DevicePolicyRequest& request,
DevicePolicyResponseDelegate* delegate) {
UMA_HISTOGRAM_ENUMERATION(kMetricPolicy, kMetricPolicyFetchRequested,
kMetricPolicySize);
AddJob(new DeviceManagementPolicyJob(this, device_management_token, device_id,
- UserAffiliationToString(affiliation),
request, delegate));
}
-// static
-const char* DeviceManagementBackendImpl::UserAffiliationToString(
- CloudPolicyDataStore::UserAffiliation affiliation) {
- switch (affiliation) {
- case CloudPolicyDataStore::USER_AFFILIATION_MANAGED:
- return kValueUserAffiliationManaged;
- case CloudPolicyDataStore::USER_AFFILIATION_NONE:
- return kValueUserAffiliationNone;
- }
- NOTREACHED();
- return kValueUserAffiliationNone;
-}
-
} // namespace policy
« no previous file with comments | « chrome/browser/policy/device_management_backend_impl.h ('k') | chrome/browser/policy/device_management_service_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698