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

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
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eafb8f1b42837b235832259d4c25d2f25cf5c6b1..d124f5a5afa72b017b5e3bbc8227dce09df5b740 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -345,6 +345,9 @@ void SafeBrowsingService::Initialize() {
}
void SafeBrowsingService::ShutDown() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+ shutdown_callback_list_.Notify();
+
// Delete the PrefChangeRegistrars, whose dtors also unregister |this| as an
// observer of the preferences.
prefs_map_.clear();
@@ -384,9 +387,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>&
@@ -690,6 +694,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.
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698