X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcomponents%2Fdata_reduction_proxy%2Fbrowser%2Fdata_reduction_proxy_protocol.h;h=e592713f215a482ecc9f44aad1184b1bb6014681;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=4c28498f79ffdbf080422210b703a2512873b85c;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h b/src/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h index 4c28498..e592713 100644 --- a/src/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h +++ b/src/components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h @@ -5,8 +5,9 @@ #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_ #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_ -#include "base/macros.h" #include "base/memory/ref_counted.h" +#include "components/data_reduction_proxy/common/data_reduction_proxy_headers.h" +#include "net/proxy/proxy_retry_info.h" namespace base { class TimeDelta; @@ -14,6 +15,8 @@ class TimeDelta; namespace net { class HttpResponseHeaders; +class ProxyConfig; +class ProxyInfo; class ProxyServer; class URLRequest; } @@ -26,12 +29,27 @@ class DataReductionProxyParams; // Decides whether to mark the data reduction proxy as temporarily bad and // put it on the proxy retry list. Returns true if the request should be -// retried. Sets |override_response_headers| to redirect if so. +// retried. Sets |override_response_headers| to redirect if so. Returns +// the DataReductionProxyBypassType (if not NULL). bool MaybeBypassProxyAndPrepareToRetry( const DataReductionProxyParams* params, net::URLRequest* request, const net::HttpResponseHeaders* original_response_headers, - scoped_refptr* override_response_headers); + scoped_refptr* override_response_headers, + DataReductionProxyBypassType* proxy_bypass_type); + +// Configure |result| to proceed directly to the origin if |result|'s current +// proxy is the data reduction proxy, the +// |net::LOAD_BYPASS_DATA_REDUCTION_PROXY| |load_flag| is set, and the +// DataCompressionProxyCriticalBypass Finch trial is set. +// This handler is intended to be invoked only by +// |ChromeNetworkDelegate.NotifyResolveProxy|. +void OnResolveProxyHandler(const GURL& url, + int load_flags, + const net::ProxyConfig& data_reduction_proxy_config, + const net::ProxyRetryInfoMap& proxy_retry_info, + const DataReductionProxyParams* params, + net::ProxyInfo* result); // Returns true if the request method is idempotent. Only idempotent requests // are retried on a bypass. Visible as part of the public API for testing. @@ -39,8 +57,8 @@ bool IsRequestIdempotent(const net::URLRequest* request); // Sets the override headers to contain a status line that indicates a // redirect (a 302), a "Location:" header that points to the request url, -// and sets load flags to bypass proxies. Visible as part of the public API for -// testing. +// and sets load flags to bypass proxies. +// Visible as part of the public API for testing. void OverrideResponseAsRedirect( net::URLRequest* request, const net::HttpResponseHeaders* original_response_headers,