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

Side by Side Diff: components/data_reduction_proxy/browser/data_reduction_proxy_protocol.h

Issue 333113002: Move data reduction proxy to Chrome-Proxy header for authentication (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@flywheel-refactor-net-fake-a-redirect-response-headers-chrome-proxy-auth
Patch Set: errata Created 6 years, 6 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 10
(...skipping 21 matching lines...) Expand all
32 net::URLRequest* request, 32 net::URLRequest* request,
33 const net::HttpResponseHeaders* original_response_headers, 33 const net::HttpResponseHeaders* original_response_headers,
34 scoped_refptr<net::HttpResponseHeaders>* override_response_headers); 34 scoped_refptr<net::HttpResponseHeaders>* override_response_headers);
35 35
36 // Returns true if the request method is idempotent. Only idempotent requests 36 // Returns true if the request method is idempotent. Only idempotent requests
37 // are retried on a bypass. Visible as part of the public API for testing. 37 // are retried on a bypass. Visible as part of the public API for testing.
38 bool IsRequestIdempotent(const net::URLRequest* request); 38 bool IsRequestIdempotent(const net::URLRequest* request);
39 39
40 // Sets the override headers to contain a status line that indicates a 40 // Sets the override headers to contain a status line that indicates a
41 // redirect (a 302), a "Location:" header that points to the request url, 41 // redirect (a 302), a "Location:" header that points to the request url,
42 // and sets load flags to bypass proxies. Visible as part of the public API for 42 // and sets load flags to bypass proxies.
43 // testing. 43 // Visible as part of the public API for testing.
44 void OverrideResponseAsRedirect( 44 void OverrideResponseAsRedirect(
45 net::URLRequest* request, 45 net::URLRequest* request,
46 const net::HttpResponseHeaders* original_response_headers, 46 const net::HttpResponseHeaders* original_response_headers,
47 scoped_refptr<net::HttpResponseHeaders>* override_response_headers); 47 scoped_refptr<net::HttpResponseHeaders>* override_response_headers);
48 48
49 // Adds non-empty entries in |data_reduction_proxies| to the retry map 49 // Adds non-empty entries in |data_reduction_proxies| to the retry map
50 // maintained by the proxy service of the request. Adds 50 // maintained by the proxy service of the request. Adds
51 // |data_reduction_proxies.second| to the retry list only if |bypass_all| is 51 // |data_reduction_proxies.second| to the retry list only if |bypass_all| is
52 // true. Visible as part of the public API for testing. 52 // true. Visible as part of the public API for testing.
53 void MarkProxiesAsBadUntil(net::URLRequest* request, 53 void MarkProxiesAsBadUntil(net::URLRequest* request,
54 base::TimeDelta& bypass_duration, 54 base::TimeDelta& bypass_duration,
55 bool bypass_all, 55 bool bypass_all,
56 const std::pair<GURL, GURL>& data_reduction_proxies); 56 const std::pair<GURL, GURL>& data_reduction_proxies);
57 57
58 } // namespace data_reduction_proxy 58 } // namespace data_reduction_proxy
59 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL _H_ 59 #endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_PROTOCOL _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698