| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/data_reduction_proxy/content/browser/data_reduction_proxy_d
ebug_resource_throttle.h" | 5 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_d
ebug_resource_throttle.h" |
| 6 | 6 |
| 7 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig.h" | 7 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_conf
ig.h" |
| 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debu
g_ui_service.h" | 8 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_debu
g_ui_service.h" |
| 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" | 9 #include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_d
ata.h" |
| 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" | 10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_param
s.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 request, resource_type, io_data->debug_ui_service(), | 38 request, resource_type, io_data->debug_ui_service(), |
| 39 io_data->config())); | 39 io_data->config())); |
| 40 } | 40 } |
| 41 return nullptr; | 41 return nullptr; |
| 42 } | 42 } |
| 43 | 43 |
| 44 // static | 44 // static |
| 45 void DataReductionProxyDebugResourceThrottle::StartDisplayingBlockingPage( | 45 void DataReductionProxyDebugResourceThrottle::StartDisplayingBlockingPage( |
| 46 scoped_refptr<DataReductionProxyDebugUIManager> ui_manager, | 46 scoped_refptr<DataReductionProxyDebugUIManager> ui_manager, |
| 47 const DataReductionProxyDebugUIManager::BypassResource& resource) { | 47 const DataReductionProxyDebugUIManager::BypassResource& resource) { |
| 48 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 48 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
| 49 ui_manager->DisplayBlockingPage(resource); | 49 ui_manager->DisplayBlockingPage(resource); |
| 50 } | 50 } |
| 51 | 51 |
| 52 DataReductionProxyDebugResourceThrottle:: | 52 DataReductionProxyDebugResourceThrottle:: |
| 53 DataReductionProxyDebugResourceThrottle( | 53 DataReductionProxyDebugResourceThrottle( |
| 54 const net::URLRequest* request, | 54 const net::URLRequest* request, |
| 55 content::ResourceType resource_type, | 55 content::ResourceType resource_type, |
| 56 const DataReductionProxyDebugUIService* ui_service, | 56 const DataReductionProxyDebugUIService* ui_service, |
| 57 const DataReductionProxyConfig* config) | 57 const DataReductionProxyConfig* config) |
| 58 : state_(NOT_BYPASSED), | 58 : state_(NOT_BYPASSED), |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 void | 138 void |
| 139 DataReductionProxyDebugResourceThrottle::OnBlockingPageComplete(bool proceed) { | 139 DataReductionProxyDebugResourceThrottle::OnBlockingPageComplete(bool proceed) { |
| 140 state_ = NOT_BYPASSED; | 140 state_ = NOT_BYPASSED; |
| 141 if (proceed) | 141 if (proceed) |
| 142 controller()->Resume(); | 142 controller()->Resume(); |
| 143 else | 143 else |
| 144 controller()->Cancel(); | 144 controller()->Cancel(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace data_reduction_proxy | 147 } // namespace data_reduction_proxy |
| OLD | NEW |