| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "components/safe_browsing_db/remote_database_manager.h" | 5 #include "components/safe_browsing_db/remote_database_manager.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 } | 284 } |
| 285 | 285 |
| 286 void RemoteSafeBrowsingDatabaseManager::StopOnIOThread(bool shutdown) { | 286 void RemoteSafeBrowsingDatabaseManager::StopOnIOThread(bool shutdown) { |
| 287 // |shutdown| is not used. | 287 // |shutdown| is not used. |
| 288 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 288 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 289 DVLOG(1) << "RemoteSafeBrowsingDatabaseManager stopping"; | 289 DVLOG(1) << "RemoteSafeBrowsingDatabaseManager stopping"; |
| 290 | 290 |
| 291 // Call back and delete any remaining clients. OnRequestDone() modifies | 291 // Call back and delete any remaining clients. OnRequestDone() modifies |
| 292 // |current_requests_|, so we make a copy first. | 292 // |current_requests_|, so we make a copy first. |
| 293 std::vector<ClientRequest*> to_callback(current_requests_); | 293 std::vector<ClientRequest*> to_callback(current_requests_); |
| 294 for (auto req : to_callback) { | 294 for (auto* req : to_callback) { |
| 295 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url(); | 295 DVLOG(1) << "Stopping: Invoking unfinished req for URL " << req->url(); |
| 296 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata()); | 296 req->OnRequestDone(SB_THREAT_TYPE_SAFE, ThreatMetadata()); |
| 297 } | 297 } |
| 298 enabled_ = false; | 298 enabled_ = false; |
| 299 | 299 |
| 300 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); | 300 SafeBrowsingDatabaseManager::StopOnIOThread(shutdown); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace safe_browsing | 303 } // namespace safe_browsing |
| OLD | NEW |