diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-17 17:55:35 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-17 17:55:35 +0000 |
commit | 00106e1c05c9dcd01f055f8682e87bc97a09c648 (patch) | |
tree | 9fb08a6a44726056dd75607022dbbf31315cb994 /net/proxy/mock_proxy_script_fetcher.h | |
parent | 92c6608cda88cf297275ba4b964b64f3475abbd6 (diff) | |
download | chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.zip chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.tar.gz chromium_src-00106e1c05c9dcd01f055f8682e87bc97a09c648.tar.bz2 |
Revert 85646 - Adds support for the DHCP portion of the WPAD (proxy auto-discovery) protocol.
This is Windows-only for now, and is disabled by default. Start
Chrome with the flag --enable-dhcp-wpad to enable the feature. See
discussion in comment on DhcpProxyScriptFetcherFactory for why this
needs to be done in a per-platform way rather than cross-platform.
The code is factored so that adding other platform implementations
will be straight forward.
Most of the implementation is stand-alone and extends the
ScriptProxyFetcher class hierarchy (and makes its interface slightly
more generic). The integration point into existing code is in
InitProxyResolver, which previously handled fallback from DNS
auto-detect to custom PAC URL and now does fallback from DHCP to DNS
to custom PAC URL.
BUG=18575
TEST=net_unittests has good coverage for the new and changed code, but
manual tests on a network with a PAC URL configured in DHCP are also
needed.
Review URL: http://codereview.chromium.org/6831025
TBR=joi@chromium.org
Review URL: http://codereview.chromium.org/7019015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85648 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/proxy/mock_proxy_script_fetcher.h')
-rw-r--r-- | net/proxy/mock_proxy_script_fetcher.h | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/net/proxy/mock_proxy_script_fetcher.h b/net/proxy/mock_proxy_script_fetcher.h deleted file mode 100644 index bd6ac42..0000000 --- a/net/proxy/mock_proxy_script_fetcher.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2011 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_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ -#define NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ -#pragma once - -#include "base/compiler_specific.h" -#include "googleurl/src/gurl.h" -#include "net/proxy/proxy_script_fetcher.h" - -#include <string> - -namespace net { - -class URLRequestContext; - -// A mock ProxyScriptFetcher. No result will be returned to the fetch client -// until we call NotifyFetchCompletion() to set the results. -class MockProxyScriptFetcher : public ProxyScriptFetcher { - public: - MockProxyScriptFetcher(); - - // ProxyScriptFetcher implementation. - virtual int Fetch(const GURL& url, - string16* text, - CompletionCallback* callback) OVERRIDE; - virtual void Cancel() OVERRIDE; - virtual URLRequestContext* GetRequestContext() const OVERRIDE; - - void NotifyFetchCompletion(int result, const std::string& ascii_text); - const GURL& pending_request_url() const; - bool has_pending_request() const; - - private: - GURL pending_request_url_; - CompletionCallback* pending_request_callback_; - string16* pending_request_text_; -}; - -} // namespace net - -#endif // NET_PROXY_MOCK_PROXY_SCRIPT_FETCHER_H_ |