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( |