| 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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 | 366 |
| 367 void SafeBrowsingService::AddDownloadManager( | 367 void SafeBrowsingService::AddDownloadManager( |
| 368 content::DownloadManager* download_manager) { | 368 content::DownloadManager* download_manager) { |
| 369 #if defined(FULL_SAFE_BROWSING) | 369 #if defined(FULL_SAFE_BROWSING) |
| 370 incident_service_->AddDownloadManager(download_manager); | 370 incident_service_->AddDownloadManager(download_manager); |
| 371 #endif | 371 #endif |
| 372 } | 372 } |
| 373 | 373 |
| 374 void SafeBrowsingService::OnResourceRequest(const net::URLRequest* request) { | 374 void SafeBrowsingService::OnResourceRequest(const net::URLRequest* request) { |
| 375 #if defined(FULL_SAFE_BROWSING) | 375 #if defined(FULL_SAFE_BROWSING) |
| 376 TRACE_EVENT1("SafeBrowsing", "SafeBrowsingServer::OnResourceRequest", "url", | 376 TRACE_EVENT1("loader", "SafeBrowsingService::OnResourceRequest", "url", |
| 377 request->url().spec()); | 377 request->url().spec()); |
| 378 if (off_domain_inclusion_detector_) | 378 if (off_domain_inclusion_detector_) |
| 379 off_domain_inclusion_detector_->OnResourceRequest(request); | 379 off_domain_inclusion_detector_->OnResourceRequest(request); |
| 380 if (resource_request_detector_) | 380 if (resource_request_detector_) |
| 381 resource_request_detector_->OnResourceRequest(request); | 381 resource_request_detector_->OnResourceRequest(request); |
| 382 #endif | 382 #endif |
| 383 } | 383 } |
| 384 | 384 |
| 385 SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() { | 385 SafeBrowsingUIManager* SafeBrowsingService::CreateUIManager() { |
| 386 return new SafeBrowsingUIManager(this); | 386 return new SafeBrowsingUIManager(this); |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 663 } | 663 } |
| 664 | 664 |
| 665 void SafeBrowsingService::OnSendDownloadRecoveryReport( | 665 void SafeBrowsingService::OnSendDownloadRecoveryReport( |
| 666 const std::string& report) { | 666 const std::string& report) { |
| 667 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 667 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 668 if (ping_manager()) | 668 if (ping_manager()) |
| 669 ping_manager()->ReportThreatDetails(report); | 669 ping_manager()->ReportThreatDetails(report); |
| 670 } | 670 } |
| 671 | 671 |
| 672 } // namespace safe_browsing | 672 } // namespace safe_browsing |
| OLD | NEW |