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

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

Issue 6537020: Update policy backend and testserver for the newest policy protocol (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more last minute changes Created 9 years, 10 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
diff --git a/chrome/browser/policy/device_management_backend_impl.cc b/chrome/browser/policy/device_management_backend_impl.cc
index b01cbf8193d9ae03e87e48e5b4e55f35230ac676..a964a28c7c7db5953d59bfc86702f1ecbb922427 100644
--- a/chrome/browser/policy/device_management_backend_impl.cc
+++ b/chrome/browser/policy/device_management_backend_impl.cc
@@ -27,14 +27,12 @@ const char DeviceManagementBackendImpl::kValueRequestRegister[] = "register";
const char DeviceManagementBackendImpl::kValueRequestUnregister[] =
"unregister";
const char DeviceManagementBackendImpl::kValueRequestPolicy[] = "policy";
-const char DeviceManagementBackendImpl::kValueRequestCloudPolicy[] =
- "cloud_policy";
-const char DeviceManagementBackendImpl::kValueDeviceType[] = "Chrome OS";
+const char DeviceManagementBackendImpl::kValueDeviceType[] = "2";
const char DeviceManagementBackendImpl::kValueAppType[] = "Chrome";
namespace {
-const char kValueAgent[] = "%s enterprise management client version %s (%s)";
+const char kValueAgent[] = "%s enterprise management client %s (%s)";
const char kPostContentType[] = "application/protobuf";
@@ -332,41 +330,6 @@ class DeviceManagementPolicyJob : public DeviceManagementJobBase {
DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyJob);
};
-// Handles cloud policy request jobs.
-class CloudPolicyJob : public DeviceManagementJobBase {
- public:
- CloudPolicyJob(
- DeviceManagementBackendImpl* backend_impl,
- const std::string& device_management_token,
- const std::string& device_id,
- const em::CloudPolicyRequest& request,
- DeviceManagementBackend::DevicePolicyResponseDelegate* delegate)
- : DeviceManagementJobBase(
- backend_impl,
- DeviceManagementBackendImpl::kValueRequestCloudPolicy,
- device_id),
- delegate_(delegate) {
- SetDeviceManagementToken(device_management_token);
- em::DeviceManagementRequest request_wrapper;
- request_wrapper.mutable_cloud_policy_request()->CopyFrom(request);
- SetPayload(request_wrapper);
- }
- virtual ~CloudPolicyJob() {}
-
- private:
- // DeviceManagementJobBase overrides.
- virtual void OnError(DeviceManagementBackend::ErrorCode error) {
- delegate_->OnError(error);
- }
- virtual void OnResponse(const em::DeviceManagementResponse& response) {
- delegate_->HandleCloudPolicyResponse(response.cloud_policy_response());
- }
-
- DeviceManagementBackend::DevicePolicyResponseDelegate* delegate_;
-
- DISALLOW_COPY_AND_ASSIGN(CloudPolicyJob);
-};
-
DeviceManagementBackendImpl::DeviceManagementBackendImpl(
DeviceManagementService* service)
: service_(service) {
@@ -428,13 +391,4 @@ void DeviceManagementBackendImpl::ProcessPolicyRequest(
request, delegate));
}
-void DeviceManagementBackendImpl::ProcessCloudPolicyRequest(
- const std::string& device_management_token,
- const std::string& device_id,
- const em::CloudPolicyRequest& request,
- DevicePolicyResponseDelegate* delegate) {
- AddJob(new CloudPolicyJob(this, device_management_token, device_id,
- request, delegate));
-}
-
} // namespace policy
« no previous file with comments | « chrome/browser/policy/device_management_backend_impl.h ('k') | chrome/browser/policy/device_management_backend_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698