| Index: net/base/proxy_delegate.h
|
| diff --git a/net/base/proxy_delegate.h b/net/base/proxy_delegate.h
|
| index 8ff6a7e999c21da42ffef7b417714128206cd662..f2e6120c20e4acc0b358e948beef8962ead3fd40 100644
|
| --- a/net/base/proxy_delegate.h
|
| +++ b/net/base/proxy_delegate.h
|
| @@ -1,17 +1,19 @@
|
| // Copyright 2014 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_PROXY_DELEGATE_H_
|
| #define NET_BASE_PROXY_DELEGATE_H_
|
|
|
| +#include <string>
|
| +
|
| #include "base/macros.h"
|
| #include "net/base/net_export.h"
|
|
|
| class GURL;
|
|
|
| namespace net {
|
|
|
| class HttpRequestHeaders;
|
| class HttpResponseHeaders;
|
| class HostPortPair;
|
| @@ -22,24 +24,27 @@ class URLRequest;
|
|
|
| // Delegate for setting up a connection.
|
| class NET_EXPORT ProxyDelegate {
|
| public:
|
| ProxyDelegate() {
|
| }
|
|
|
| virtual ~ProxyDelegate() {
|
| }
|
|
|
| - // Called as the proxy is being resolved for |url|. Allows the delegate to
|
| - // override the proxy resolution decision made by ProxyService. The delegate
|
| - // may override the decision by modifying the ProxyInfo |result|.
|
| + // Called as the proxy is being resolved for |url| for a |method| request.
|
| + // The caller may pass an empty string to get method agnostic resoulution.
|
| + // Allows the delegate to override the proxy resolution decision made by
|
| + // ProxyService. The delegate may override the decision by modifying the
|
| + // ProxyInfo |result|.
|
| virtual void OnResolveProxy(const GURL& url,
|
| + const std::string& method,
|
| int load_flags,
|
| const ProxyService& proxy_service,
|
| ProxyInfo* result) = 0;
|
|
|
| // Called when use of |bad_proxy| fails due to |net_error|. |net_error| is
|
| // the network error encountered, if any, and OK if the fallback was
|
| // for a reason other than a network error (e.g. the proxy service was
|
| // explicitly directed to skip a proxy).
|
| virtual void OnFallback(const ProxyServer& bad_proxy,
|
| int net_error) = 0;
|
|
|