aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiyuan Xia <xiyuan@google.com>2016-02-01 19:40:01 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-02-01 19:40:01 +0000
commitef77887b08e6c79f4594d96b285e98b1232f83ee (patch)
tree62f9c23c11a62653441cd1aa3f4fe9a67712fb32
parent022e3852c19589ca91fd6cc337db8d042041717b (diff)
parentb2e83208f8e974ad7ee726332fd471c8852057a3 (diff)
downloadplatform_external_libbrillo-ef77887b08e6c79f4594d96b285e98b1232f83ee.tar.gz
platform_external_libbrillo-ef77887b08e6c79f4594d96b285e98b1232f83ee.tar.bz2
platform_external_libbrillo-ef77887b08e6c79f4594d96b285e98b1232f83ee.zip
Remove deprecated policy DeviceProxySettingsProto
am: b2e83208f8 * commit 'b2e83208f8e974ad7ee726332fd471c8852057a3': Remove deprecated policy DeviceProxySettingsProto
-rw-r--r--policy/device_policy.h16
-rw-r--r--policy/device_policy_impl.cc53
-rw-r--r--policy/device_policy_impl.h4
-rw-r--r--policy/mock_device_policy.h4
-rw-r--r--policy/tests/libpolicy_unittest.cc13
5 files changed, 0 insertions, 90 deletions
diff --git a/policy/device_policy.h b/policy/device_policy.h
index 7a60a65..34e7a64 100644
--- a/policy/device_policy.h
+++ b/policy/device_policy.h
@@ -83,22 +83,6 @@ class DevicePolicy {
virtual bool GetEphemeralUsersEnabled(
bool* ephemeral_users_enabled) const = 0;
- // Writes the value of the ProxyMode policy in |proxy_mode|. Returns true on
- // success.
- virtual bool GetProxyMode(std::string* proxy_mode) const = 0;
-
- // Writes the value of the ProxyServer policy in |proxy_server|. Returns true
- // on success.
- virtual bool GetProxyServer(std::string* proxy_server) const = 0;
-
- // Writes the value of the ProxyPacUrl policy in |proxy_pac|. Returns true on
- // success.
- virtual bool GetProxyPacUrl(std::string* proxy_pac) const = 0;
-
- // Writes the value of the ProxyBypassList policy in |proxy_bypass_list|.
- // Returns true on success.
- virtual bool GetProxyBypassList(std::string* proxy_bypass_list) const = 0;
-
// Writes the value of the release channel policy in |release_channel|.
// Returns true on success.
virtual bool GetReleaseChannel(std::string* release_channel) const = 0;
diff --git a/policy/device_policy_impl.cc b/policy/device_policy_impl.cc
index 7d9bc60..565fb62 100644
--- a/policy/device_policy_impl.cc
+++ b/policy/device_policy_impl.cc
@@ -246,59 +246,6 @@ bool DevicePolicyImpl::GetEphemeralUsersEnabled(
return true;
}
-bool DevicePolicyImpl::GetProxyMode(std::string* proxy_mode) const {
- if (!device_policy_.has_device_proxy_settings())
- return false;
-
- const enterprise_management::DeviceProxySettingsProto& proto =
- device_policy_.device_proxy_settings();
- if (!proto.has_proxy_mode())
- return false;
-
- *proxy_mode = proto.proxy_mode();
- return true;
-}
-
-bool DevicePolicyImpl::GetProxyServer(std::string* proxy_server) const {
- if (!device_policy_.has_device_proxy_settings())
- return false;
-
- const enterprise_management::DeviceProxySettingsProto& proto =
- device_policy_.device_proxy_settings();
- if (!proto.has_proxy_server())
- return false;
-
- *proxy_server = proto.proxy_server();
- return true;
-}
-
-bool DevicePolicyImpl::GetProxyPacUrl(std::string* proxy_pac) const {
- if (!device_policy_.has_device_proxy_settings())
- return false;
-
- const enterprise_management::DeviceProxySettingsProto& proto =
- device_policy_.device_proxy_settings();
- if (!proto.has_proxy_pac_url())
- return false;
-
- *proxy_pac = proto.proxy_pac_url();
- return true;
-}
-
-bool DevicePolicyImpl::GetProxyBypassList(
- std::string* proxy_bypass_list) const {
- if (!device_policy_.has_device_proxy_settings())
- return false;
-
- const enterprise_management::DeviceProxySettingsProto& proto =
- device_policy_.device_proxy_settings();
- if (!proto.has_proxy_bypass_list())
- return false;
-
- *proxy_bypass_list = proto.proxy_bypass_list();
- return true;
-}
-
bool DevicePolicyImpl::GetReleaseChannel(
std::string* release_channel) const {
if (!device_policy_.has_release_channel())
diff --git a/policy/device_policy_impl.h b/policy/device_policy_impl.h
index 7174ce1..7733469 100644
--- a/policy/device_policy_impl.h
+++ b/policy/device_policy_impl.h
@@ -43,10 +43,6 @@ class DevicePolicyImpl : public DevicePolicy {
virtual bool GetReportActivityTimes(bool* report_activity_times) const;
virtual bool GetReportBootMode(bool* report_boot_mode) const;
virtual bool GetEphemeralUsersEnabled(bool* ephemeral_users_enabled) const;
- virtual bool GetProxyMode(std::string* proxy_mode) const;
- virtual bool GetProxyServer(std::string* proxy_server) const;
- virtual bool GetProxyPacUrl(std::string* proxy_pac) const;
- virtual bool GetProxyBypassList(std::string* proxy_bypass_list) const;
virtual bool GetReleaseChannel(std::string* release_channel) const;
virtual bool GetReleaseChannelDelegated(
bool* release_channel_delegated) const;
diff --git a/policy/mock_device_policy.h b/policy/mock_device_policy.h
index bd53787..0986bb6 100644
--- a/policy/mock_device_policy.h
+++ b/policy/mock_device_policy.h
@@ -76,10 +76,6 @@ class MockDevicePolicy : public DevicePolicy {
bool(bool*)); // NOLINT(readability/function)
MOCK_CONST_METHOD1(GetEphemeralUsersEnabled,
bool(bool*)); // NOLINT(readability/function)
- MOCK_CONST_METHOD1(GetProxyMode, bool(std::string*));
- MOCK_CONST_METHOD1(GetProxyServer, bool(std::string*));
- MOCK_CONST_METHOD1(GetProxyPacUrl, bool(std::string*));
- MOCK_CONST_METHOD1(GetProxyBypassList, bool(std::string*));
MOCK_CONST_METHOD1(GetReleaseChannel, bool(std::string*));
MOCK_CONST_METHOD1(GetReleaseChannelDelegated,
bool(bool*)); // NOLINT(readability/function)
diff --git a/policy/tests/libpolicy_unittest.cc b/policy/tests/libpolicy_unittest.cc
index 45475b5..02e800d 100644
--- a/policy/tests/libpolicy_unittest.cc
+++ b/policy/tests/libpolicy_unittest.cc
@@ -111,19 +111,6 @@ TEST(PolicyTest, DevicePolicyAllSetTest) {
ASSERT_TRUE(policy.GetEphemeralUsersEnabled(&bool_value));
ASSERT_FALSE(bool_value);
- std::string string_value;
- ASSERT_TRUE(policy.GetProxyMode(&string_value));
- ASSERT_EQ("direct", string_value);
-
- ASSERT_TRUE(policy.GetProxyServer(&string_value));
- ASSERT_EQ("myproxy", string_value);
-
- ASSERT_TRUE(policy.GetProxyPacUrl(&string_value));
- ASSERT_EQ("http://mypac.pac", string_value);
-
- ASSERT_TRUE(policy.GetProxyBypassList(&string_value));
- ASSERT_EQ("a, b, c", string_value);
-
ASSERT_TRUE(policy.GetReleaseChannel(&string_value));
ASSERT_EQ("stable-channel", string_value);