OLD | NEW |
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 "chrome/browser/net/chrome_network_delegate.h" | 5 #include "chrome/browser/net/chrome_network_delegate.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 net::URLRequest* request, | 503 net::URLRequest* request, |
504 const net::HttpRequestHeaders& headers) { | 504 const net::HttpRequestHeaders& headers) { |
505 ExtensionWebRequestEventRouter::GetInstance()->OnSendHeaders( | 505 ExtensionWebRequestEventRouter::GetInstance()->OnSendHeaders( |
506 profile_, extension_info_map_.get(), request, headers); | 506 profile_, extension_info_map_.get(), request, headers); |
507 } | 507 } |
508 | 508 |
509 int ChromeNetworkDelegate::OnHeadersReceived( | 509 int ChromeNetworkDelegate::OnHeadersReceived( |
510 net::URLRequest* request, | 510 net::URLRequest* request, |
511 const net::CompletionCallback& callback, | 511 const net::CompletionCallback& callback, |
512 const net::HttpResponseHeaders* original_response_headers, | 512 const net::HttpResponseHeaders* original_response_headers, |
513 scoped_refptr<net::HttpResponseHeaders>* override_response_headers) { | 513 scoped_refptr<net::HttpResponseHeaders>* override_response_headers, |
| 514 GURL* allowed_unsafe_redirect_url) { |
514 return ExtensionWebRequestEventRouter::GetInstance()->OnHeadersReceived( | 515 return ExtensionWebRequestEventRouter::GetInstance()->OnHeadersReceived( |
515 profile_, extension_info_map_.get(), request, callback, | 516 profile_, extension_info_map_.get(), request, callback, |
516 original_response_headers, override_response_headers); | 517 original_response_headers, override_response_headers, |
| 518 allowed_unsafe_redirect_url); |
517 } | 519 } |
518 | 520 |
519 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, | 521 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, |
520 const GURL& new_location) { | 522 const GURL& new_location) { |
521 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect( | 523 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect( |
522 profile_, extension_info_map_.get(), request, new_location); | 524 profile_, extension_info_map_.get(), request, new_location); |
523 } | 525 } |
524 | 526 |
525 | 527 |
526 void ChromeNetworkDelegate::OnResponseStarted(net::URLRequest* request) { | 528 void ChromeNetworkDelegate::OnResponseStarted(net::URLRequest* request) { |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 spdyproxy::DataReductionRequestType data_reduction_type) { | 805 spdyproxy::DataReductionRequestType data_reduction_type) { |
804 DCHECK_GE(received_content_length, 0); | 806 DCHECK_GE(received_content_length, 0); |
805 DCHECK_GE(original_content_length, 0); | 807 DCHECK_GE(original_content_length, 0); |
806 StoreAccumulatedContentLength(received_content_length, | 808 StoreAccumulatedContentLength(received_content_length, |
807 original_content_length, | 809 original_content_length, |
808 data_reduction_type, | 810 data_reduction_type, |
809 reinterpret_cast<Profile*>(profile_)); | 811 reinterpret_cast<Profile*>(profile_)); |
810 received_content_length_ += received_content_length; | 812 received_content_length_ += received_content_length; |
811 original_content_length_ += original_content_length; | 813 original_content_length_ += original_content_length; |
812 } | 814 } |
OLD | NEW |