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

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

Issue 2103693002: SafeBrowsing PVer4: Send mutable response to the database and the stores (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@02_ReadFromDisk
Patch Set: Minor: Add the explicit keyword for UpdateListIdentifier constructor Created 4 years, 5 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // Delete the V4UpdateProtocolManager. 247 // Delete the V4UpdateProtocolManager.
248 // This cancels any in-flight update request. 248 // This cancels any in-flight update request.
249 v4_update_protocol_manager_.reset(); 249 v4_update_protocol_manager_.reset();
250 250
251 db_updated_callback_.Reset(); 251 db_updated_callback_.Reset();
252 252
253 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); 253 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown);
254 } 254 }
255 255
256 void V4LocalDatabaseManager::UpdateRequestCompleted( 256 void V4LocalDatabaseManager::UpdateRequestCompleted(
257 const std::vector<ListUpdateResponse>& responses) { 257 std::unique_ptr<ParsedServerResponse> parsed_server_response) {
258 DCHECK_CURRENTLY_ON(BrowserThread::IO); 258 DCHECK_CURRENTLY_ON(BrowserThread::IO);
259 v4_database_->ApplyUpdate(responses, db_updated_callback_); 259 v4_database_->ApplyUpdate(std::move(parsed_server_response),
260 db_updated_callback_);
260 } 261 }
261 262
262 void V4LocalDatabaseManager::DatabaseUpdated() { 263 void V4LocalDatabaseManager::DatabaseUpdated() {
263 v4_update_protocol_manager_->ScheduleNextUpdate( 264 v4_update_protocol_manager_->ScheduleNextUpdate(
264 v4_database_->GetStoreStateMap()); 265 v4_database_->GetStoreStateMap());
265 } 266 }
266 267
267 } // namespace safe_browsing 268 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing_db/v4_local_database_manager.h ('k') | components/safe_browsing_db/v4_protocol_manager_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698