| OLD | NEW |
| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // Delete the V4UpdateProtocolManager. | 244 // Delete the V4UpdateProtocolManager. |
| 245 // This cancels any in-flight update request. | 245 // This cancels any in-flight update request. |
| 246 v4_update_protocol_manager_.reset(); | 246 v4_update_protocol_manager_.reset(); |
| 247 | 247 |
| 248 db_updated_callback_.Reset(); | 248 db_updated_callback_.Reset(); |
| 249 | 249 |
| 250 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); | 250 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); |
| 251 } | 251 } |
| 252 | 252 |
| 253 void V4LocalDatabaseManager::UpdateRequestCompleted( | 253 void V4LocalDatabaseManager::UpdateRequestCompleted( |
| 254 const std::vector<ListUpdateResponse>& responses) { | 254 std::unique_ptr<ParsedServerResponse> parsed_server_response) { |
| 255 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 255 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 256 v4_database_->ApplyUpdate(responses, db_updated_callback_); | 256 v4_database_->ApplyUpdate(std::move(parsed_server_response), |
| 257 db_updated_callback_); |
| 257 } | 258 } |
| 258 | 259 |
| 259 void V4LocalDatabaseManager::DatabaseUpdated() { | 260 void V4LocalDatabaseManager::DatabaseUpdated() { |
| 260 v4_update_protocol_manager_->ScheduleNextUpdate( | 261 v4_update_protocol_manager_->ScheduleNextUpdate( |
| 261 v4_database_->GetStoreStateMap()); | 262 v4_database_->GetStoreStateMap()); |
| 262 } | 263 } |
| 263 | 264 |
| 264 } // namespace safe_browsing | 265 } // namespace safe_browsing |
| OLD | NEW |