shill: Add http_proxy class

The http_proxy adds a device/connection based proxy that guarantees
to the caller that its HTTP request will go out a particular device's
connection.  DNS requests occur through a bound socket to this device
and goes to DNS servers configured on this connection.  HTTP requests
will also be bound to this interface.  This facility will be used by
a number of peripheral bits including portal detection, activation and
cashew.

BUG=chromium-os:21664
TEST=New unit test.  New (disabled) functional test, against which I
can run "curl -x" and Chrome with manual proxy settings.

Change-Id: I0d59bf0ae27d3538ef359f786742f5c2f1d6fef9
Reviewed-on: https://gerrit.chromium.org/gerrit/10165
Reviewed-by: Thieu Le <thieule@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
diff --git a/mock_dns_client.h b/mock_dns_client.h
new file mode 100644
index 0000000..73cf62d
--- /dev/null
+++ b/mock_dns_client.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SHILL_MOCK_DNS_CLIENT_H_
+#define SHILL_MOCK_DNS_CLIENT_H_
+
+#include "shill/dns_client.h"
+
+#include <base/basictypes.h>
+#include <gmock/gmock.h>
+
+namespace shill {
+
+class MockDNSClient : public DNSClient {
+ public:
+  MockDNSClient();
+  virtual ~MockDNSClient();
+
+  MOCK_METHOD1(Start, bool(const std::string &hostname));
+  MOCK_METHOD0(Stop, void());
+  MOCK_CONST_METHOD0(address, const IPAddress &());
+  MOCK_CONST_METHOD0(error, const std::string &());
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(MockDNSClient);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_MOCK_DNS_CLIENT_H_