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

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

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)
Patch Set: Rebase onto crrev/2543523002 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 a5aa510ec350c666c4168766ab1b821c9c88bc9b..5a98470e433aabafec22043a1b432a8775cc9628 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -333,6 +333,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();
@@ -372,9 +374,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>&
@@ -665,6 +668,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