From 23ce43c353afdfe50571bfb57ceb384216170b84 Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Wed, 16 Feb 2011 09:52:42 +0000 Subject: Revert 75082 - New policy protobuf protocol. - cloud_policy.proto autogenerated from policy_templates.json - C++ method decoding the protobuf autogenerated from policy_templates.json - changed policy fetching mechanism to fetch new-style policy protobufs BUG=68309, chromium-os:11253, chromium-os:11255 TEST=CloudPolicyCacheTest.*; also manual test against python testserver Review URL: http://codereview.chromium.org/6409040 TBR=jkummerow@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75084 0039d316-1c4b-4281-b951-d872f2087c98 --- .../policy/mock_device_management_backend.h | 25 ---------------------- 1 file changed, 25 deletions(-) (limited to 'chrome/browser/policy/mock_device_management_backend.h') diff --git a/chrome/browser/policy/mock_device_management_backend.h b/chrome/browser/policy/mock_device_management_backend.h index 54c8c8f..a684e4f 100644 --- a/chrome/browser/policy/mock_device_management_backend.h +++ b/chrome/browser/policy/mock_device_management_backend.h @@ -9,7 +9,6 @@ #include #include -#include "base/time.h" #include "base/values.h" #include "chrome/browser/policy/device_management_backend.h" #include "chrome/browser/policy/proto/device_management_constants.h" @@ -47,12 +46,6 @@ class MockDeviceManagementBackend : public DeviceManagementBackend { const em::DevicePolicyRequest& request, DevicePolicyResponseDelegate* delegate)); - MOCK_METHOD4(ProcessCloudPolicyRequest, void( - const std::string& device_management_token, - const std::string& device_id, - const em::CloudPolicyRequest& request, - DevicePolicyResponseDelegate* delegate)); - private: DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementBackend); }; @@ -80,24 +73,6 @@ ACTION_P2(MockDeviceManagementBackendSucceedBooleanPolicy, name, value) { arg3->HandlePolicyResponse(response); } -ACTION(MockDeviceManagementBackendSucceedSpdyCloudPolicy) { - em::SignedCloudPolicyResponse signed_response; - em::CloudPolicySettings* settings = signed_response.mutable_settings(); - em::DisableSpdyProto* spdy_proto = settings->mutable_disablespdy(); - spdy_proto->set_disablespdy(true); - spdy_proto->mutable_policy_options()->set_mode(em::PolicyOptions::MANDATORY); - signed_response.set_timestamp(base::Time::NowFromSystemTime().ToTimeT()); - std::string serialized_signed_response; - EXPECT_TRUE(signed_response.SerializeToString(&serialized_signed_response)); - em::CloudPolicyResponse response; - response.set_signed_response(serialized_signed_response); - // TODO(jkummerow): Set proper certificate_chain and signature (when - // implementing support for signature verification). - response.set_signature("TODO"); - response.add_certificate_chain("TODO"); - arg3->HandleCloudPolicyResponse(response); -} - ACTION_P(MockDeviceManagementBackendFailRegister, error) { arg3->OnError(error); } -- cgit v1.1