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

Unified Diff: components/safe_browsing_db/v4_local_database_manager.cc

Issue 2647323009: Add extended reporting level in the update request (Closed)
Patch Set: rebase Created 3 years, 11 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
Index: components/safe_browsing_db/v4_local_database_manager.cc
diff --git a/components/safe_browsing_db/v4_local_database_manager.cc b/components/safe_browsing_db/v4_local_database_manager.cc
index 58f7ae8d63d8de943f615d360c32346814726b4f..224525982461fdc8790a48b51f45464a3f536294 100644
--- a/components/safe_browsing_db/v4_local_database_manager.cc
+++ b/components/safe_browsing_db/v4_local_database_manager.cc
@@ -128,16 +128,21 @@ V4LocalDatabaseManager::PendingCheck::~PendingCheck() {}
// static
scoped_refptr<V4LocalDatabaseManager> V4LocalDatabaseManager::Create(
- const base::FilePath& base_path) {
+ const base::FilePath& base_path,
+ ExtendedReportingLevelCallback extended_reporting_level_callback) {
if (!V4FeatureList::IsLocalDatabaseManagerEnabled()) {
return nullptr;
}
- return make_scoped_refptr(new V4LocalDatabaseManager(base_path));
+ return make_scoped_refptr(
+ new V4LocalDatabaseManager(base_path, extended_reporting_level_callback));
}
-V4LocalDatabaseManager::V4LocalDatabaseManager(const base::FilePath& base_path)
+V4LocalDatabaseManager::V4LocalDatabaseManager(
+ const base::FilePath& base_path,
+ ExtendedReportingLevelCallback extended_reporting_level_callback)
: base_path_(base_path),
+ extended_reporting_level_callback_(extended_reporting_level_callback),
list_infos_(GetListInfos()),
weak_factory_(this) {
DCHECK(!base_path_.empty());
@@ -707,12 +712,13 @@ void V4LocalDatabaseManager::SetupDatabase() {
void V4LocalDatabaseManager::SetupUpdateProtocolManager(
net::URLRequestContextGetter* request_context_getter,
const V4ProtocolConfig& config) {
- V4UpdateCallback callback =
+ V4UpdateCallback update_callback =
base::Bind(&V4LocalDatabaseManager::UpdateRequestCompleted,
weak_factory_.GetWeakPtr());
- v4_update_protocol_manager_ =
- V4UpdateProtocolManager::Create(request_context_getter, config, callback);
+ v4_update_protocol_manager_ = V4UpdateProtocolManager::Create(
+ request_context_getter, config, update_callback,
+ extended_reporting_level_callback_);
}
void V4LocalDatabaseManager::UpdateRequestCompleted(

Powered by Google App Engine
This is Rietveld 408576698