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

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

Issue 2675063002: Browser tests for using the new SafeBrowsing protocol (v4) (Closed)
Patch Set: shess@'s review Created 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 // This file should not be build on Android but is currently getting built. 5 // This file should not be build on Android but is currently getting built.
6 // TODO(vakh): Fix that: http://crbug.com/621647 6 // TODO(vakh): Fix that: http://crbug.com/621647
7 7
8 #include "components/safe_browsing_db/v4_local_database_manager.h" 8 #include "components/safe_browsing_db/v4_local_database_manager.h"
9 9
10 #include <vector> 10 #include <vector>
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 stores_to_check(stores_to_check) { 123 stores_to_check(stores_to_check) {
124 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end()); 124 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end());
125 } 125 }
126 126
127 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {} 127 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {}
128 128
129 // static 129 // static
130 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create( 130 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create(
131 const base::FilePath& base_path, 131 const base::FilePath& base_path,
132 ExtendedReportingLevelCallback extended_reporting_level_callback) { 132 ExtendedReportingLevelCallback extended_reporting_level_callback) {
133 if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
134 return nullptr;
135 }
136
137 return make_scoped_refptr( 133 return make_scoped_refptr(
138 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback)); 134 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback));
139 } 135 }
140 136
141 V4LocalDatabaseManager::V4LocalDatabaseManager( 137 V4LocalDatabaseManager::V4LocalDatabaseManager(
142 const base::FilePath& base_path, 138 const base::FilePath& base_path,
143 ExtendedReportingLevelCallback extended_reporting_level_callback) 139 ExtendedReportingLevelCallback extended_reporting_level_callback)
144 : base_path_(base_path), 140 : base_path_(base_path),
145 extended_reporting_level_callback_(extended_reporting_level_callback), 141 extended_reporting_level_callback_(extended_reporting_level_callback),
146 list_infos_(GetListInfos()), 142 list_infos_(GetListInfos()),
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 db_updated_callback_); 724 db_updated_callback_);
729 } 725 }
730 726
731 bool V4LocalDatabaseManager::AreStoresAvailableNow( 727 bool V4LocalDatabaseManager::AreStoresAvailableNow(
732 const StoresToCheck& stores_to_check) const { 728 const StoresToCheck& stores_to_check) const {
733 return enabled_ && v4_database_ && 729 return enabled_ && v4_database_ &&
734 v4_database_->AreStoresAvailable(stores_to_check); 730 v4_database_->AreStoresAvailable(stores_to_check);
735 } 731 }
736 732
737 } // namespace safe_browsing 733 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698