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

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: Rebased Created 6 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 (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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 void ChromeNetworkDelegate::OnSendHeaders( 502 void ChromeNetworkDelegate::OnSendHeaders(
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 GURL* new_url,
512 const net::HttpResponseHeaders* original_response_headers, 513 const net::HttpResponseHeaders* original_response_headers,
513 scoped_refptr<net::HttpResponseHeaders>* override_response_headers) { 514 scoped_refptr<net::HttpResponseHeaders>* override_response_headers) {
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, new_url,
516 original_response_headers, override_response_headers); 517 original_response_headers, override_response_headers);
517 } 518 }
518 519
519 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request, 520 void ChromeNetworkDelegate::OnBeforeRedirect(net::URLRequest* request,
520 const GURL& new_location) { 521 const GURL& new_location) {
521 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect( 522 ExtensionWebRequestEventRouter::GetInstance()->OnBeforeRedirect(
522 profile_, extension_info_map_.get(), request, new_location); 523 profile_, extension_info_map_.get(), request, new_location);
523 } 524 }
524 525
525 526
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 spdyproxy::DataReductionRequestType data_reduction_type) { 801 spdyproxy::DataReductionRequestType data_reduction_type) {
801 DCHECK_GE(received_content_length, 0); 802 DCHECK_GE(received_content_length, 0);
802 DCHECK_GE(original_content_length, 0); 803 DCHECK_GE(original_content_length, 0);
803 StoreAccumulatedContentLength(received_content_length, 804 StoreAccumulatedContentLength(received_content_length,
804 original_content_length, 805 original_content_length,
805 data_reduction_type, 806 data_reduction_type,
806 reinterpret_cast<Profile*>(profile_)); 807 reinterpret_cast<Profile*>(profile_));
807 received_content_length_ += received_content_length; 808 received_content_length_ += received_content_length;
808 original_content_length_ += original_content_length; 809 original_content_length_ += original_content_length;
809 } 810 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698