Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2831)

Unified Diff: net/base/fixed_host_resolver.h

Issue 345034: Add a command line flag to force all network traffic through a particular ser... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/base/fixed_host_resolver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/fixed_host_resolver.h
===================================================================
--- net/base/fixed_host_resolver.h (revision 0)
+++ net/base/fixed_host_resolver.h (revision 0)
@@ -0,0 +1,42 @@
+// Copyright (c) 2009 The Chromium 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 NET_BASE_FIXED_HOST_RESOLVER_H_
+#define NET_BASE_FIXED_HOST_RESOLVER_H_
+
+#include <string>
+
+#include "net/base/address_list.h"
+#include "net/base/host_resolver.h"
+
+namespace net {
+
+// A FixedHostResolver resolves all addresses to a single address.
+class FixedHostResolver : public HostResolver {
+ public:
+ // |host_and_port| is a string representing the resolution.
+ // example: foo.myproxy.com:1234
+ explicit FixedHostResolver(const std::string& host_and_port);
+
+ // HostResolver methods:
+ virtual int Resolve(const RequestInfo& info,
+ AddressList* addresses,
+ CompletionCallback* callback,
+ RequestHandle* out_req,
+ LoadLog* load_log);
+ virtual void CancelRequest(RequestHandle req) {}
+ virtual void AddObserver(Observer* observer) {}
+ virtual void RemoveObserver(Observer* observer) {}
+ virtual HostCache* GetHostCache() { return NULL; }
+ virtual void Shutdown() {}
+
+ private:
+ AddressList address_;
+ bool initialized_;
+};
+
+} // namespace net
+
+#endif // NET_BASE_MOCK_HOST_RESOLVER_H_
+
Property changes on: net\base\fixed_host_resolver.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/common/chrome_switches.cc ('k') | net/base/fixed_host_resolver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698