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

Unified Diff: components/safe_browsing_db/database_manager.h

Issue 1700943003: SafeBrowsing: DatabaseManager owns the V4GetHashProtocolManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass NULL for the url_context_getter Created 4 years, 10 months 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 | « components/safe_browsing_db/BUILD.gn ('k') | components/safe_browsing_db/database_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/database_manager.h
diff --git a/components/safe_browsing_db/database_manager.h b/components/safe_browsing_db/database_manager.h
index 4924cacb32503fd883bdb906f0c620691e6205af..0bebc37d4f0d82b34f70ac25de72385b5d8339e0 100644
--- a/components/safe_browsing_db/database_manager.h
+++ b/components/safe_browsing_db/database_manager.h
@@ -20,8 +20,15 @@
#include "content/public/common/resource_type.h"
#include "url/gurl.h"
+namespace net {
+class URLRequestContextGetter;
+} // namespace net
+
namespace safe_browsing {
+struct V4GetHashProtocolConfig;
+class V4GetHashProtocolManager;
+
// Base class to either the locally-managed or a remotely-managed database.
class SafeBrowsingDatabaseManager
: public base::RefCountedThreadSafe<SafeBrowsingDatabaseManager> {
@@ -146,9 +153,19 @@ class SafeBrowsingDatabaseManager
virtual void StopOnIOThread(bool shutdown) = 0;
protected:
- virtual ~SafeBrowsingDatabaseManager() {}
+ // Use this constructor for testing only.
+ SafeBrowsingDatabaseManager();
+
+ // Constructs the database manager.
+ SafeBrowsingDatabaseManager(
+ net::URLRequestContextGetter* request_context_getter,
+ const V4GetHashProtocolConfig& config);
+
+ virtual ~SafeBrowsingDatabaseManager();
friend class base::RefCountedThreadSafe<SafeBrowsingDatabaseManager>;
+
+ std::unique_ptr<V4GetHashProtocolManager> v4_get_hash_protocol_manager_;
}; // class SafeBrowsingDatabaseManager
} // namespace safe_browsing
« no previous file with comments | « components/safe_browsing_db/BUILD.gn ('k') | components/safe_browsing_db/database_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698