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

Side by Side Diff: net/http/http_network_transaction_unittest.cc

Issue 360113004: Add header pointer to BeforeProxyHeadersSentCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 6 years, 5 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
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_transaction.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/http/http_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 bool observed_before_network_start_; 431 bool observed_before_network_start_;
432 432
433 DISALLOW_COPY_AND_ASSIGN(BeforeNetworkStartHandler); 433 DISALLOW_COPY_AND_ASSIGN(BeforeNetworkStartHandler);
434 }; 434 };
435 435
436 class BeforeProxyHeadersSentHandler { 436 class BeforeProxyHeadersSentHandler {
437 public: 437 public:
438 BeforeProxyHeadersSentHandler() 438 BeforeProxyHeadersSentHandler()
439 : observed_before_proxy_headers_sent_(false) {} 439 : observed_before_proxy_headers_sent_(false) {}
440 440
441 void OnBeforeProxyHeadersSent(const ProxyInfo& proxy_info) { 441 void OnBeforeProxyHeadersSent(const ProxyInfo& proxy_info,
442 HttpRequestHeaders* request_headers) {
442 observed_before_proxy_headers_sent_ = true; 443 observed_before_proxy_headers_sent_ = true;
443 observed_proxy_server_uri_ = proxy_info.proxy_server().ToURI(); 444 observed_proxy_server_uri_ = proxy_info.proxy_server().ToURI();
444 } 445 }
445 446
446 bool observed_before_proxy_headers_sent() const { 447 bool observed_before_proxy_headers_sent() const {
447 return observed_before_proxy_headers_sent_; 448 return observed_before_proxy_headers_sent_;
448 } 449 }
449 450
450 std::string observed_proxy_server_uri() const { 451 std::string observed_proxy_server_uri() const {
451 return observed_proxy_server_uri_; 452 return observed_proxy_server_uri_;
(...skipping 12751 matching lines...) Expand 10 before | Expand all | Expand 10 after
13203 EXPECT_EQ(ERR_IO_PENDING, rv); 13204 EXPECT_EQ(ERR_IO_PENDING, rv);
13204 13205
13205 rv = callback.WaitForResult(); 13206 rv = callback.WaitForResult();
13206 EXPECT_EQ(ERR_CONNECTION_RESET, rv); 13207 EXPECT_EQ(ERR_CONNECTION_RESET, rv);
13207 13208
13208 const HttpResponseInfo* response = trans->GetResponseInfo(); 13209 const HttpResponseInfo* response = trans->GetResponseInfo();
13209 EXPECT_TRUE(response == NULL); 13210 EXPECT_TRUE(response == NULL);
13210 } 13211 }
13211 13212
13212 } // namespace net 13213 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/http/http_transaction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698