| 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/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 "chrome/browser/download/download_util.h" | 8 #include "chrome/browser/download/download_util.h" |
| 9 #include "content/public/browser/resource_throttle_controller.h" | 9 #include "content/public/browser/resource_controller.h" |
| 10 | 10 |
| 11 DownloadResourceThrottle::DownloadResourceThrottle( | 11 DownloadResourceThrottle::DownloadResourceThrottle( |
| 12 DownloadRequestLimiter* limiter, | 12 DownloadRequestLimiter* limiter, |
| 13 int render_process_id, | 13 int render_process_id, |
| 14 int render_view_id, | 14 int render_view_id, |
| 15 int request_id, | 15 int request_id, |
| 16 const std::string& request_method) | 16 const std::string& request_method) |
| 17 : querying_limiter_(true), | 17 : querying_limiter_(true), |
| 18 request_allowed_(false), | 18 request_allowed_(false), |
| 19 request_deferred_(false) { | 19 request_deferred_(false) { |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 if (request_deferred_) { | 71 if (request_deferred_) { |
| 72 request_deferred_ = false; | 72 request_deferred_ = false; |
| 73 if (allow) { | 73 if (allow) { |
| 74 controller()->Resume(); | 74 controller()->Resume(); |
| 75 } else { | 75 } else { |
| 76 controller()->Cancel(); | 76 controller()->Cancel(); |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 } | 79 } |
| OLD | NEW |