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

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: Use ANNOTATE_LEAKING_OBJECT_PTR 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 stores_to_check(stores_to_check) { 129 stores_to_check(stores_to_check) {
130 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end()); 130 full_hashes.assign(full_hashes_set.begin(), full_hashes_set.end());
131 } 131 }
132 132
133 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {} 133 V4LocalDatabaseManager::PendingCheck::~PendingCheck() {}
134 134
135 // static 135 // static
136 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create( 136 scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create(
137 const base::FilePath& base_path, 137 const base::FilePath& base_path,
138 ExtendedReportingLevelCallback extended_reporting_level_callback) { 138 ExtendedReportingLevelCallback extended_reporting_level_callback) {
139 if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
140 return nullptr;
141 }
142
143 return make_scoped_refptr( 139 return make_scoped_refptr(
144 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback)); 140 new V4LocalDatabaseManager(base_path, extended_reporting_level_callback));
145 } 141 }
146 142
147 V4LocalDatabaseManager::V4LocalDatabaseManager( 143 V4LocalDatabaseManager::V4LocalDatabaseManager(
148 const base::FilePath& base_path, 144 const base::FilePath& base_path,
149 ExtendedReportingLevelCallback extended_reporting_level_callback) 145 ExtendedReportingLevelCallback extended_reporting_level_callback)
150 : base_path_(base_path), 146 : base_path_(base_path),
151 extended_reporting_level_callback_(extended_reporting_level_callback), 147 extended_reporting_level_callback_(extended_reporting_level_callback),
152 list_infos_(GetListInfos()), 148 list_infos_(GetListInfos()),
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
742 db_updated_callback_); 738 db_updated_callback_);
743 } 739 }
744 740
745 bool V4LocalDatabaseManager::AreStoresAvailableNow( 741 bool V4LocalDatabaseManager::AreStoresAvailableNow(
746 const StoresToCheck& stores_to_check) const { 742 const StoresToCheck& stores_to_check) const {
747 return enabled_ && v4_database_ && 743 return enabled_ && v4_database_ &&
748 v4_database_->AreStoresAvailable(stores_to_check); 744 v4_database_->AreStoresAvailable(stores_to_check);
749 } 745 }
750 746
751 } // namespace safe_browsing 747 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_get_hash_protocol_manager.h ('k') | components/safe_browsing_db/v4_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698