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

Side by Side Diff: chrome/browser/download/download_resource_throttle.cc

Issue 893843003: Add RedirectInfo as a redirect parameter to ResourceThrottles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Document ResourceThrottle Created 5 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/download/download_resource_throttle.h" 5 #include "chrome/browser/download/download_resource_throttle.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/profiler/scoped_tracker.h" 8 #include "base/profiler/scoped_tracker.h"
9 #include "chrome/browser/download/download_stats.h" 9 #include "chrome/browser/download/download_stats.h"
10 #include "content/public/browser/resource_controller.h" 10 #include "content/public/browser/resource_controller.h"
(...skipping 16 matching lines...) Expand all
27 AsWeakPtr())); 27 AsWeakPtr()));
28 } 28 }
29 29
30 DownloadResourceThrottle::~DownloadResourceThrottle() { 30 DownloadResourceThrottle::~DownloadResourceThrottle() {
31 } 31 }
32 32
33 void DownloadResourceThrottle::WillStartRequest(bool* defer) { 33 void DownloadResourceThrottle::WillStartRequest(bool* defer) {
34 WillDownload(defer); 34 WillDownload(defer);
35 } 35 }
36 36
37 void DownloadResourceThrottle::WillRedirectRequest(const GURL& new_url, 37 void DownloadResourceThrottle::WillRedirectRequest(
38 bool* defer) { 38 const net::RedirectInfo& redirect_info,
39 bool* defer) {
39 WillDownload(defer); 40 WillDownload(defer);
40 } 41 }
41 42
42 void DownloadResourceThrottle::WillProcessResponse(bool* defer) { 43 void DownloadResourceThrottle::WillProcessResponse(bool* defer) {
43 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed. 44 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422516 is fixed.
44 tracked_objects::ScopedTracker tracking_profile( 45 tracked_objects::ScopedTracker tracking_profile(
45 FROM_HERE_WITH_EXPLICIT_FUNCTION( 46 FROM_HERE_WITH_EXPLICIT_FUNCTION(
46 "422516 DownloadResourceThrottle::WillProcessResponse")); 47 "422516 DownloadResourceThrottle::WillProcessResponse"));
47 48
48 WillDownload(defer); 49 WillDownload(defer);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 if (request_deferred_) { 82 if (request_deferred_) {
82 request_deferred_ = false; 83 request_deferred_ = false;
83 if (allow) { 84 if (allow) {
84 controller()->Resume(); 85 controller()->Resume();
85 } else { 86 } else {
86 controller()->Cancel(); 87 controller()->Cancel();
87 } 88 }
88 } 89 }
89 } 90 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_resource_throttle.h ('k') | chrome/browser/prerender/prerender_resource_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698