| Index: chrome/browser/safe_browsing/client_side_detection_host.cc
|
| diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
|
| index ac57ed847cee312179e784e8db277629bc81057b..2f33534d91afb35f1d0389fcf31fae025d7bb718 100644
|
| --- a/chrome/browser/safe_browsing/client_side_detection_host.cc
|
| +++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
|
| @@ -177,6 +177,8 @@ class ClientSideDetectionHost::ShouldClassifyUrlRequest
|
| return;
|
| }
|
|
|
| + host_->malware_killswitch_on_ = database_manager_->MalwareKillSwitchOn();
|
| +
|
| BrowserThread::PostTask(
|
| BrowserThread::UI,
|
| FROM_HERE,
|
| @@ -251,6 +253,7 @@ ClientSideDetectionHost::ClientSideDetectionHost(WebContents* tab)
|
| csd_service_(NULL),
|
| weak_factory_(this),
|
| unsafe_unique_page_id_(-1),
|
| + malware_killswitch_on_(false),
|
| malware_report_enabled_(false) {
|
| DCHECK(tab);
|
| // Note: csd_service_ and sb_service will be NULL here in testing.
|
| @@ -389,15 +392,16 @@ void ClientSideDetectionHost::OnPhishingDetectionDone(
|
| browse_info_.get() &&
|
| verdict->ParseFromString(verdict_str) &&
|
| verdict->IsInitialized()) {
|
| - if (malware_report_enabled_) {
|
| + // We do the malware IP matching and request sending if the feature
|
| + // is enabled
|
| + if (malware_report_enabled_ && !malware_killswitch_on_) {
|
| scoped_ptr<ClientMalwareRequest> malware_verdict(
|
| new ClientMalwareRequest);
|
| // Start browser-side malware feature extraction. Once we're done it will
|
| // send the malware client verdict request.
|
| malware_verdict->set_url(verdict->url());
|
| feature_extractor_->ExtractMalwareFeatures(
|
| - browse_info_.get(),
|
| - malware_verdict.get());
|
| + browse_info_.get(), malware_verdict.get());
|
| MalwareFeatureExtractionDone(malware_verdict.Pass());
|
| }
|
|
|
|
|