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

Side by Side Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 154473002: Support redirectUrl at onHeadersReceived in WebRequest / DWR API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix WebRequestRulesRegistrySimpleTest.StageChecker test Created 6 years, 9 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 (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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 net::URLRequest* request, 505 net::URLRequest* request,
506 const net::HttpRequestHeaders& headers) { 506 const net::HttpRequestHeaders& headers) {
507 ExtensionWebRequestEventRouter::GetInstance()->OnSendHeaders( 507 ExtensionWebRequestEventRouter::GetInstance()->OnSendHeaders(
508 profile_, extension_info_map_.get(), request, headers); 508 profile_, extension_info_map_.get(), request, headers);
509 } 509 }
510 510
511 int ChromeNetworkDelegate::OnHeadersReceived( 511 int ChromeNetworkDelegate::OnHeadersReceived(
512 net::URLRequest* request, 512 net::URLRequest* request,
513 const net::CompletionCallback& callback, 513 const net::CompletionCallback& callback,
514 const net::HttpResponseHeaders* original_response_headers, 514 const net::HttpResponseHeaders* original_response_headers,
515 scoped_refptr<net::HttpResponseHeaders>* override_response_headers) { 515 scoped_refptr<net::HttpResponseHeaders>* override_response_headers,
516 GURL* allowed_unsafe_redirect_url) {
516 return ExtensionWebRequestEventRouter::GetInstance()->OnHeadersReceived( 517 return ExtensionWebRequestEventRouter::GetInstance()->OnHeadersReceived(
517 profile_, extension_info_map_.get(), request, callback, 518 profile_,
518 original_response_headers, override_response_headers); 519 extension_info_map_.get(),
520 request,
521 callback,
522 original_response_headers,
523 override_response_headers,
524 allowed_unsafe_redirect_url);
519 } 525 }
520 526
521 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, 527 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
522 const GURL& new_location) { 528 const GURL& new_location) {
523 if (domain_reliability_monitor_) 529 if (domain_reliability_monitor_)
524 domain_reliability_monitor_->OnBeforeRedirect(request); 530 domain_reliability_monitor_->OnBeforeRedirect(request);
525 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect( 531 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect(
526 profile_, extension_info_map_.get(), request, new_location); 532 profile_, extension_info_map_.get(), request, new_location);
527 } 533 }
528 534
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
822 spdyproxy::DataReductionRequestType data_reduction_type) { 828 spdyproxy::DataReductionRequestType data_reduction_type) {
823 DCHECK_GE(received_content_length, 0); 829 DCHECK_GE(received_content_length, 0);
824 DCHECK_GE(original_content_length, 0); 830 DCHECK_GE(original_content_length, 0);
825 StoreAccumulatedContentLength(received_content_length, 831 StoreAccumulatedContentLength(received_content_length,
826 original_content_length, 832 original_content_length,
827 data_reduction_type, 833 data_reduction_type,
828 reinterpret_cast<Profile*>(profile_)); 834 reinterpret_cast<Profile*>(profile_));
829 received_content_length_ += received_content_length; 835 received_content_length_ += received_content_length;
830 original_content_length_ += original_content_length; 836 original_content_length_ += original_content_length;
831 } 837 }
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.h ('k') | chrome/common/extensions/api/web_request.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698