From 62fed2f49842268ddc5963b9a8b8110d08a06779 Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Wed, 24 Nov 2010 14:30:50 +0000 Subject: Device management constants cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Move device management protocol constants into shared header file • Filter out policies with unwanted keys when decoding server response This also fixes bug 62058. BUG=62481 TEST=existing unit tests still work: DeviceManagementPolicyProviderTest.*:DeviceTokenFetcherTest.* Review URL: http://codereview.chromium.org/5348001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67259 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/policy/mock_device_management_backend.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 3b0cb33..83323de 100644 --- a/chrome/browser/policy/mock_device_management_backend.h +++ b/chrome/browser/policy/mock_device_management_backend.h @@ -11,6 +11,7 @@ #include "base/values.h" #include "chrome/browser/policy/device_management_backend.h" +#include "chrome/browser/policy/proto/device_management_constants.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -62,7 +63,7 @@ ACTION(MockDeviceManagementBackendSucceedRegister) { ACTION_P2(MockDeviceManagementBackendSucceedBooleanPolicy, name, value) { em::DevicePolicyResponse response; em::DevicePolicySetting* setting = response.add_setting(); - setting->set_policy_key("chrome-policy"); + setting->set_policy_key(kChromeDevicePolicySettingKey); setting->set_watermark("fresh"); em::GenericSetting* policy_value = setting->mutable_policy_value(); em::GenericNamedValue* named_value = policy_value->add_named_value(); -- cgit v1.1