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

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: Nit: Add comments in tests 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 stores_to_check(stores_to_check) { 126 stores_to_check(stores_to_check) {
127 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end()); 127 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end());
128 } 128 }
129 129
130 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {} 130 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {}
131 131
132 // static 132 // static
133 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create( 133 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create(
134 const base::FilePath& base_path, 134 const base::FilePath& base_path,
135 ExtendedReportingLevelCallback extended_reporting_level_callback) { 135 ExtendedReportingLevelCallback extended_reporting_level_callback) {
136 if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
137 return nullptr;
138 }
139
140 return make_scoped_refptr( 136 return make_scoped_refptr(
141 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback)); 137 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback));
142 } 138 }
143 139
144 V4LocalDatabaseManager::V4LocalDatabaseManager( 140 V4LocalDatabaseManager::V4LocalDatabaseManager(
145 const base::FilePath& base_path, 141 const base::FilePath& base_path,
146 ExtendedReportingLevelCallback extended_reporting_level_callback) 142 ExtendedReportingLevelCallback extended_reporting_level_callback)
147 : base_path_(base_path), 143 : base_path_(base_path),
148 extended_reporting_level_callback_(extended_reporting_level_callback), 144 extended_reporting_level_callback_(extended_reporting_level_callback),
149 list_infos_(GetListInfos()), 145 list_infos_(GetListInfos()),
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 db_updated_callback_); 735 db_updated_callback_);
740 } 736 }
741 737
742 bool V4LocalDatabaseManager::AreStoresAvailableNow( 738 bool V4LocalDatabaseManager::AreStoresAvailableNow(
743 const StoresToCheck& stores_to_check) const { 739 const StoresToCheck& stores_to_check) const {
744 return enabled_ && v4_database_ && 740 return enabled_ && v4_database_ &&
745 v4_database_->AreStoresAvailable(stores_to_check); 741 v4_database_->AreStoresAvailable(stores_to_check);
746 } 742 }
747 743
748 } // namespace safe_browsing 744 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698