Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 1436273002: Send safe browsing ThreatDetails to track download CTR when user tries to recover blocked downloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 state_callback_list_.Notify(); 638 state_callback_list_.Notify();
639 639
640 #if defined(FULL_SAFE_BROWSING) 640 #if defined(FULL_SAFE_BROWSING)
641 if (csd_service_) 641 if (csd_service_)
642 csd_service_->SetEnabledAndRefreshState(enable); 642 csd_service_->SetEnabledAndRefreshState(enable);
643 if (download_service_) 643 if (download_service_)
644 download_service_->SetEnabled(enable); 644 download_service_->SetEnabled(enable);
645 #endif 645 #endif
646 } 646 }
647 647
648 void SafeBrowsingService::SendDownloadRecoveryReport(
649 const std::string& report) {
650 DCHECK_CURRENTLY_ON(BrowserThread::UI);
651 BrowserThread::PostTask(
652 BrowserThread::IO, FROM_HERE,
653 base::Bind(&SafeBrowsingService::OnSendDownloadRecoveryReport, this,
654 report));
655 }
656
657 void SafeBrowsingService::OnSendDownloadRecoveryReport(
658 const std::string& report) {
659 DCHECK_CURRENTLY_ON(BrowserThread::IO);
660 if (ping_manager())
661 ping_manager()->ReportThreatDetails(report);
662 }
663
648 } // namespace safe_browsing 664 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.h ('k') | chrome/browser/ui/views/download/download_danger_prompt_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698