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

Side by Side Diff: net/base/test_proxy_delegate.cc

Issue 1684123004: Bypass the DataReductionProxy for all POST requests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reorder parameters and change "" to std::string() Created 4 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include "net/base/test_proxy_delegate.h" 5 #include "net/base/test_proxy_delegate.h"
6 6
7 #include "net/http/http_request_headers.h" 7 #include "net/http/http_request_headers.h"
8 #include "net/http/http_response_headers.h" 8 #include "net/http/http_response_headers.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 22 matching lines...) Expand all
33 const std::string& status_line) const { 33 const std::string& status_line) const {
34 EXPECT_TRUE(on_tunnel_headers_received_called_); 34 EXPECT_TRUE(on_tunnel_headers_received_called_);
35 EXPECT_TRUE(HostPortPair::FromString(origin).Equals( 35 EXPECT_TRUE(HostPortPair::FromString(origin).Equals(
36 on_tunnel_headers_received_origin_)); 36 on_tunnel_headers_received_origin_));
37 EXPECT_TRUE(HostPortPair::FromString(proxy_server) 37 EXPECT_TRUE(HostPortPair::FromString(proxy_server)
38 .Equals(on_tunnel_headers_received_proxy_server_)); 38 .Equals(on_tunnel_headers_received_proxy_server_));
39 EXPECT_EQ(status_line, on_tunnel_headers_received_status_line_); 39 EXPECT_EQ(status_line, on_tunnel_headers_received_status_line_);
40 } 40 }
41 41
42 void TestProxyDelegate::OnResolveProxy(const GURL& url, 42 void TestProxyDelegate::OnResolveProxy(const GURL& url,
43 const std::string& method,
43 int load_flags, 44 int load_flags,
44 const ProxyService& proxy_service, 45 const ProxyService& proxy_service,
45 ProxyInfo* result) {} 46 ProxyInfo* result) {}
46 47
47 void TestProxyDelegate::OnTunnelConnectCompleted( 48 void TestProxyDelegate::OnTunnelConnectCompleted(
48 const HostPortPair& endpoint, 49 const HostPortPair& endpoint,
49 const HostPortPair& proxy_server, 50 const HostPortPair& proxy_server,
50 int net_error) { 51 int net_error) {
51 on_tunnel_request_completed_called_ = true; 52 on_tunnel_request_completed_called_ = true;
52 on_tunnel_request_completed_endpoint_ = endpoint; 53 on_tunnel_request_completed_endpoint_ = endpoint;
(...skipping 23 matching lines...) Expand all
76 on_tunnel_headers_received_origin_ = origin; 77 on_tunnel_headers_received_origin_ = origin;
77 on_tunnel_headers_received_proxy_server_ = proxy_server; 78 on_tunnel_headers_received_proxy_server_ = proxy_server;
78 on_tunnel_headers_received_status_line_ = response_headers.GetStatusLine(); 79 on_tunnel_headers_received_status_line_ = response_headers.GetStatusLine();
79 } 80 }
80 81
81 bool TestProxyDelegate::IsTrustedSpdyProxy( 82 bool TestProxyDelegate::IsTrustedSpdyProxy(
82 const net::ProxyServer& proxy_server) { 83 const net::ProxyServer& proxy_server) {
83 return proxy_server.is_valid() && trusted_spdy_proxy_ == proxy_server; 84 return proxy_server.is_valid() && trusted_spdy_proxy_ == proxy_server;
84 } 85 }
85 86
86 } // namespace net 87 } // namespace net
bengr 2016/02/21 21:36:39 And here?
RyanSturm 2016/02/26 22:16:18 Done.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698