| 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_ui_manager.h" | 5 #include "components/data_reduction_proxy/content/browser/data_reduction_proxy_d
ebug_ui_manager.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // minutes. | 21 // minutes. |
| 22 const int kBlockingPageDelayInMinutes = 5; | 22 const int kBlockingPageDelayInMinutes = 5; |
| 23 } | 23 } |
| 24 | 24 |
| 25 DataReductionProxyDebugUIManager::BypassResource::BypassResource() | 25 DataReductionProxyDebugUIManager::BypassResource::BypassResource() |
| 26 : is_subresource(false), | 26 : is_subresource(false), |
| 27 render_process_host_id(-1), | 27 render_process_host_id(-1), |
| 28 render_view_id(-1) { | 28 render_view_id(-1) { |
| 29 } | 29 } |
| 30 | 30 |
| 31 DataReductionProxyDebugUIManager::BypassResource::BypassResource( |
| 32 const BypassResource& other) = default; |
| 33 |
| 31 DataReductionProxyDebugUIManager::BypassResource::~BypassResource() { | 34 DataReductionProxyDebugUIManager::BypassResource::~BypassResource() { |
| 32 } | 35 } |
| 33 | 36 |
| 34 DataReductionProxyDebugUIManager::DataReductionProxyDebugUIManager( | 37 DataReductionProxyDebugUIManager::DataReductionProxyDebugUIManager( |
| 35 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, | 38 const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner, |
| 36 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, | 39 const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner, |
| 37 const std::string& app_locale) | 40 const std::string& app_locale) |
| 38 : ui_task_runner_(ui_task_runner), | 41 : ui_task_runner_(ui_task_runner), |
| 39 io_task_runner_(io_task_runner), | 42 io_task_runner_(io_task_runner), |
| 40 app_locale_(app_locale) { | 43 app_locale_(app_locale) { |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 iter != resources.end(); ++iter) { | 104 iter != resources.end(); ++iter) { |
| 102 const BypassResource& resource = *iter; | 105 const BypassResource& resource = *iter; |
| 103 if (!resource.callback.is_null()) | 106 if (!resource.callback.is_null()) |
| 104 resource.callback.Run(proceed); | 107 resource.callback.Run(proceed); |
| 105 } | 108 } |
| 106 if (proceed) | 109 if (proceed) |
| 107 blocking_page_last_shown_ = base::Time::Now(); | 110 blocking_page_last_shown_ = base::Time::Now(); |
| 108 } | 111 } |
| 109 | 112 |
| 110 } // namespace data_reduction_proxy | 113 } // namespace data_reduction_proxy |
| OLD | NEW |