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