| 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/safe_browsing/safe_browsing_service.h" | 5 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 std::unique_ptr<net::ChannelIDService> channel_id_service_; | 152 std::unique_ptr<net::ChannelIDService> channel_id_service_; |
| 153 std::unique_ptr<net::HttpNetworkSession> http_network_session_; | 153 std::unique_ptr<net::HttpNetworkSession> http_network_session_; |
| 154 std::unique_ptr<net::HttpTransactionFactory> http_transaction_factory_; | 154 std::unique_ptr<net::HttpTransactionFactory> http_transaction_factory_; |
| 155 }; | 155 }; |
| 156 | 156 |
| 157 SafeBrowsingURLRequestContextGetter::SafeBrowsingURLRequestContextGetter( | 157 SafeBrowsingURLRequestContextGetter::SafeBrowsingURLRequestContextGetter( |
| 158 scoped_refptr<net::URLRequestContextGetter> system_context_getter) | 158 scoped_refptr<net::URLRequestContextGetter> system_context_getter) |
| 159 : shut_down_(false), | 159 : shut_down_(false), |
| 160 system_context_getter_(system_context_getter), | 160 system_context_getter_(system_context_getter), |
| 161 network_task_runner_( | 161 network_task_runner_( |
| 162 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)) {} | 162 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)) {} |
| 163 | 163 |
| 164 net::URLRequestContext* | 164 net::URLRequestContext* |
| 165 SafeBrowsingURLRequestContextGetter::GetURLRequestContext() { | 165 SafeBrowsingURLRequestContextGetter::GetURLRequestContext() { |
| 166 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 166 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 167 | 167 |
| 168 // Check if the service has been shut down. | 168 // Check if the service has been shut down. |
| 169 if (shut_down_) | 169 if (shut_down_) |
| 170 return nullptr; | 170 return nullptr; |
| 171 | 171 |
| 172 if (!safe_browsing_request_context_) { | 172 if (!safe_browsing_request_context_) { |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 ping_manager()->ReportThreatDetails(report); | 695 ping_manager()->ReportThreatDetails(report); |
| 696 } | 696 } |
| 697 | 697 |
| 698 void SafeBrowsingService::ProcessResourceRequest( | 698 void SafeBrowsingService::ProcessResourceRequest( |
| 699 const ResourceRequestInfo& request) { | 699 const ResourceRequestInfo& request) { |
| 700 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 700 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 701 services_delegate_->ProcessResourceRequest(&request); | 701 services_delegate_->ProcessResourceRequest(&request); |
| 702 } | 702 } |
| 703 | 703 |
| 704 } // namespace safe_browsing | 704 } // namespace safe_browsing |
| OLD | NEW |