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

Side by Side Diff: net/url_request/url_request_test_util.cc

Issue 1431723002: Add brotli content-encoding filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/url_request/url_request_test_util.h" 5 #include "net/url_request/url_request_test_util.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 HttpRequestHeaders* headers) { 393 HttpRequestHeaders* headers) {
394 int req_id = request->identifier(); 394 int req_id = request->identifier();
395 InitRequestStatesIfNew(req_id); 395 InitRequestStatesIfNew(req_id);
396 event_order_[req_id] += "OnBeforeSendHeaders\n"; 396 event_order_[req_id] += "OnBeforeSendHeaders\n";
397 EXPECT_TRUE(next_states_[req_id] & kStageBeforeSendHeaders) << 397 EXPECT_TRUE(next_states_[req_id] & kStageBeforeSendHeaders) <<
398 event_order_[req_id]; 398 event_order_[req_id];
399 next_states_[req_id] = 399 next_states_[req_id] =
400 kStageSendHeaders | 400 kStageSendHeaders |
401 kStageCompletedError; // request canceled by delegate 401 kStageCompletedError; // request canceled by delegate
402 before_send_headers_count_++; 402 before_send_headers_count_++;
403 last_headers_.CopyFrom(*headers);
403 return OK; 404 return OK;
404 } 405 }
405 406
406 void TestNetworkDelegate::OnBeforeSendProxyHeaders( 407 void TestNetworkDelegate::OnBeforeSendProxyHeaders(
407 URLRequest* request, 408 URLRequest* request,
408 const ProxyInfo& proxy_info, 409 const ProxyInfo& proxy_info,
409 HttpRequestHeaders* headers) { 410 HttpRequestHeaders* headers) {
410 ++observed_before_proxy_headers_sent_callbacks_; 411 ++observed_before_proxy_headers_sent_callbacks_;
411 last_observed_proxy_ = proxy_info.proxy_server().host_port_pair(); 412 last_observed_proxy_ = proxy_info.proxy_server().host_port_pair();
412 } 413 }
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 URLRequestJob* job = main_intercept_job_; 638 URLRequestJob* job = main_intercept_job_;
638 main_intercept_job_ = NULL; 639 main_intercept_job_ = NULL;
639 return job; 640 return job;
640 } 641 }
641 642
642 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) { 643 void TestJobInterceptor::set_main_intercept_job(URLRequestJob* job) {
643 main_intercept_job_ = job; 644 main_intercept_job_ = job;
644 } 645 }
645 646
646 } // namespace net 647 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698