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

Side by Side Diff: components/safe_browsing_db/database_manager.cc

Issue 1703413002: Move common PVer4 code into a V4ProtocolManagerUtil class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass config as pointer, instead of reference 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/safe_browsing_db/database_manager.h" 5 #include "components/safe_browsing_db/database_manager.h"
6 6
7 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h" 7 #include "components/safe_browsing_db/v4_get_hash_protocol_manager.h"
8 #include "net/url_request/url_request_context_getter.h" 8 #include "net/url_request/url_request_context_getter.h"
9 #include "url/gurl.h" 9 #include "url/gurl.h"
10 10
11 namespace safe_browsing { 11 namespace safe_browsing {
12 12
13 SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager() 13 SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager()
14 : SafeBrowsingDatabaseManager(NULL, V4GetHashProtocolConfig()) { 14 : SafeBrowsingDatabaseManager(NULL, V4ProtocolConfig()) {
15 } 15 }
16 16
17 SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager( 17 SafeBrowsingDatabaseManager::SafeBrowsingDatabaseManager(
18 net::URLRequestContextGetter* request_context_getter, 18 net::URLRequestContextGetter* request_context_getter,
19 const V4GetHashProtocolConfig& config) { 19 const V4ProtocolConfig& config) {
20 // Instantiate a V4GetHashProtocolManager. 20 // Instantiate a V4GetHashProtocolManager.
21 if (request_context_getter) { 21 if (request_context_getter) {
22 v4_get_hash_protocol_manager_.reset(V4GetHashProtocolManager::Create( 22 v4_get_hash_protocol_manager_.reset(V4GetHashProtocolManager::Create(
23 request_context_getter, config)); 23 request_context_getter, config));
24 } 24 }
25 } 25 }
26 26
27 SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() { 27 SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() {
28 } 28 }
29 29
30 void SafeBrowsingDatabaseManager::CheckApiBlacklistUrl(const GURL& url, 30 void SafeBrowsingDatabaseManager::CheckApiBlacklistUrl(const GURL& url,
31 Client* client) { 31 Client* client) {
32 // TODO(kcarattini): Implement this. 32 // TODO(kcarattini): Implement this.
33 } 33 }
34 34
35 } // namespace safe_browsing 35 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/database_manager.h ('k') | components/safe_browsing_db/remote_database_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698