Update to use libbrillo Chrome proxy resolver
This uses the new proxy resolution code in libbrillo for doing proxy
resolution rather than making the D-Bus calls directly through the
generated bindings. The unittest for this class was removed since the
main function of it was removed. It now is essentially just a wrapper
around the call into libbrillo along with some minimal code for
allowing cancelling of callbacks.
BUG=chromium:771386
TEST=Unit tests pass
Change-Id: Ib0d4e413482f4bdfe0e9689f68118efbec94ec9d
Reviewed-on: https://chromium-review.googlesource.com/698964
Commit-Ready: Jeffrey Kardatzke <jkardatzke@google.com>
Tested-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Amin Hassani <ahassani@chromium.org>
Reviewed-by: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: Sen Jiang <senj@chromium.org>
diff --git a/update_attempter_unittest.cc b/update_attempter_unittest.cc
index 6a08139..fed21ca 100644
--- a/update_attempter_unittest.cc
+++ b/update_attempter_unittest.cc
@@ -30,10 +30,6 @@
#include <policy/libpolicy.h>
#include <policy/mock_device_policy.h>
-#if USE_CHROME_NETWORK_PROXY
-#include "network_proxy/dbus-proxies.h"
-#include "network_proxy/dbus-proxy-mocks.h"
-#endif // USE_CHROME_NETWORK_PROXY
#include "update_engine/common/fake_clock.h"
#include "update_engine/common/fake_prefs.h"
#include "update_engine/common/mock_action.h"
@@ -52,16 +48,8 @@
#include "update_engine/payload_consumer/payload_constants.h"
#include "update_engine/payload_consumer/postinstall_runner_action.h"
-namespace org {
-namespace chromium {
-class NetworkProxyServiceInterfaceProxyMock;
-} // namespace chromium
-} // namespace org
-
using base::Time;
using base::TimeDelta;
-using org::chromium::NetworkProxyServiceInterfaceProxyInterface;
-using org::chromium::NetworkProxyServiceInterfaceProxyMock;
using std::string;
using std::unique_ptr;
using testing::DoAll;
@@ -83,10 +71,8 @@
// methods.
class UpdateAttempterUnderTest : public UpdateAttempter {
public:
- UpdateAttempterUnderTest(
- SystemState* system_state,
- NetworkProxyServiceInterfaceProxyInterface* network_proxy_service_proxy)
- : UpdateAttempter(system_state, nullptr, network_proxy_service_proxy) {}
+ explicit UpdateAttempterUnderTest(SystemState* system_state)
+ : UpdateAttempter(system_state, nullptr) {}
// Wrap the update scheduling method, allowing us to opt out of scheduled
// updates for testing purposes.
@@ -186,13 +172,7 @@
brillo::BaseMessageLoop loop_{&base_loop_};
FakeSystemState fake_system_state_;
-#if USE_CHROME_NETWORK_PROXY
- NetworkProxyServiceInterfaceProxyMock network_proxy_service_proxy_mock_;
- UpdateAttempterUnderTest attempter_{&fake_system_state_,
- &network_proxy_service_proxy_mock_};
-#else
- UpdateAttempterUnderTest attempter_{&fake_system_state_, nullptr};
-#endif // USE_CHROME_NETWORK_PROXY
+ UpdateAttempterUnderTest attempter_{&fake_system_state_};
OpenSSLWrapper openssl_wrapper_;
CertificateChecker certificate_checker_;