| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 #if defined(FULL_SAFE_BROWSING) | 70 #if defined(FULL_SAFE_BROWSING) |
| 71 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 71 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
| 72 #include "chrome/browser/safe_browsing/download_protection_service.h" | 72 #include "chrome/browser/safe_browsing/download_protection_service.h" |
| 73 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer.h" | 73 #include "chrome/browser/safe_browsing/incident_reporting/binary_integrity_analy
zer.h" |
| 74 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyze
r.h" | 74 #include "chrome/browser/safe_browsing/incident_reporting/blacklist_load_analyze
r.h" |
| 75 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" | 75 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser
vice.h" |
| 76 #include "chrome/browser/safe_browsing/incident_reporting/module_load_analyzer.h
" | 76 #include "chrome/browser/safe_browsing/incident_reporting/module_load_analyzer.h
" |
| 77 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec
tor.h" | 77 #include "chrome/browser/safe_browsing/incident_reporting/resource_request_detec
tor.h" |
| 78 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_analyzer.h" | 78 #include "chrome/browser/safe_browsing/incident_reporting/variations_seed_signat
ure_analyzer.h" |
| 79 #include "chrome/browser/safe_browsing/protocol_manager.h" | 79 #include "chrome/browser/safe_browsing/protocol_manager.h" |
| 80 #include "chrome/browser/safe_browsing/protocol_manager_helper.h" | |
| 81 #endif | 80 #endif |
| 82 | 81 |
| 83 using content::BrowserThread; | 82 using content::BrowserThread; |
| 84 | 83 |
| 85 namespace safe_browsing { | 84 namespace safe_browsing { |
| 86 | 85 |
| 87 namespace { | 86 namespace { |
| 88 | 87 |
| 89 // Filename suffix for the cookie database. | 88 // Filename suffix for the cookie database. |
| 90 const base::FilePath::CharType kCookiesFile[] = FILE_PATH_LITERAL(" Cookies"); | 89 const base::FilePath::CharType kCookiesFile[] = FILE_PATH_LITERAL(" Cookies"); |
| (...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 519 |
| 521 return config; | 520 return config; |
| 522 } | 521 } |
| 523 | 522 |
| 524 V4ProtocolConfig | 523 V4ProtocolConfig |
| 525 SafeBrowsingService::GetV4ProtocolConfig() const { | 524 SafeBrowsingService::GetV4ProtocolConfig() const { |
| 526 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); | 525 base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); |
| 527 return V4ProtocolConfig( | 526 return V4ProtocolConfig( |
| 528 GetProtocolConfigClientName(), | 527 GetProtocolConfigClientName(), |
| 529 cmdline->HasSwitch(::switches::kDisableBackgroundNetworking), | 528 cmdline->HasSwitch(::switches::kDisableBackgroundNetworking), |
| 530 google_apis::GetAPIKey(), SafeBrowsingProtocolManagerHelper::Version()); | 529 google_apis::GetAPIKey(), ProtocolManagerHelper::Version()); |
| 531 } | 530 } |
| 532 | 531 |
| 533 std::string SafeBrowsingService::GetProtocolConfigClientName() const { | 532 std::string SafeBrowsingService::GetProtocolConfigClientName() const { |
| 534 std::string client_name; | 533 std::string client_name; |
| 535 // On Windows, get the safe browsing client name from the browser | 534 // On Windows, get the safe browsing client name from the browser |
| 536 // distribution classes in installer util. These classes don't yet have | 535 // distribution classes in installer util. These classes don't yet have |
| 537 // an analog on non-Windows builds so just keep the name specified here. | 536 // an analog on non-Windows builds so just keep the name specified here. |
| 538 #if defined(OS_WIN) | 537 #if defined(OS_WIN) |
| 539 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); | 538 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| 540 client_name = dist->GetSafeBrowsingName(); | 539 client_name = dist->GetSafeBrowsingName(); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 ping_manager()->ReportThreatDetails(report); | 762 ping_manager()->ReportThreatDetails(report); |
| 764 } | 763 } |
| 765 | 764 |
| 766 void SafeBrowsingService::ProcessResourceRequest( | 765 void SafeBrowsingService::ProcessResourceRequest( |
| 767 const ResourceRequestInfo& request) { | 766 const ResourceRequestInfo& request) { |
| 768 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 767 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 769 services_delegate_->ProcessResourceRequest(&request); | 768 services_delegate_->ProcessResourceRequest(&request); |
| 770 } | 769 } |
| 771 | 770 |
| 772 } // namespace safe_browsing | 771 } // namespace safe_browsing |
| OLD | NEW |