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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_service.cc

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)
Patch Set: Rebase Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_service.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index d03c2e4637e38292ab6b1501386d272bc71ee20b..57b3bfcb14942bd61c1771114f0c8498dd6df5a8 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -339,6 +339,8 @@ void SafeBrowsingService::Initialize() {
}
void SafeBrowsingService::ShutDown() {
+ shutdown_callback_list_.Notify();
+
// Delete the PrefChangeRegistrars, whose dtors also unregister |this| as an
// observer of the preferences.
prefs_map_.clear();
@@ -378,9 +380,10 @@ bool SafeBrowsingService::DownloadBinHashNeeded() const {
#endif
}
-net::URLRequestContextGetter* SafeBrowsingService::url_request_context() {
+scoped_refptr<net::URLRequestContextGetter>
+SafeBrowsingService::url_request_context() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
- return url_request_context_getter_.get();
+ return url_request_context_getter_;
}
const scoped_refptr<SafeBrowsingUIManager>&
@@ -679,6 +682,13 @@ SafeBrowsingService::RegisterStateCallback(
return state_callback_list_.Add(callback);
}
+std::unique_ptr<SafeBrowsingService::ShutdownSubscription>
+SafeBrowsingService::RegisterShutdownCallback(
+ const base::Callback<void(void)>& callback) {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ return shutdown_callback_list_.Add(callback);
+}
+
void SafeBrowsingService::RefreshState() {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
// Check if any profile requires the service to be active.

Powered by Google App Engine
This is Rietveld 408576698