| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/browser/extensions/fake_safe_browsing_database_manager.h" | 5 #include "chrome/browser/extensions/fake_safe_browsing_database_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 111 |
| 112 for (size_t i = 0; i < extension_ids_vector.size(); ++i) { | 112 for (size_t i = 0; i < extension_ids_vector.size(); ++i) { |
| 113 const std::string& extension_id = extension_ids_vector[i]; | 113 const std::string& extension_id = extension_ids_vector[i]; |
| 114 if (unsafe_ids_.count(extension_id)) | 114 if (unsafe_ids_.count(extension_id)) |
| 115 safe_browsing_check->full_hash_results[i] = | 115 safe_browsing_check->full_hash_results[i] = |
| 116 safe_browsing::SB_THREAT_TYPE_EXTENSION; | 116 safe_browsing::SB_THREAT_TYPE_EXTENSION; |
| 117 } | 117 } |
| 118 | 118 |
| 119 base::ThreadTaskRunnerHandle::Get()->PostTask( | 119 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 120 FROM_HERE, | 120 FROM_HERE, |
| 121 base::Bind(&FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult, this, | 121 base::BindOnce(&FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult, |
| 122 base::Passed(&safe_browsing_check))); | 122 this, base::Passed(&safe_browsing_check))); |
| 123 return false; | 123 return false; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult( | 126 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult( |
| 127 std::unique_ptr<SafeBrowsingCheck> result) { | 127 std::unique_ptr<SafeBrowsingCheck> result) { |
| 128 result->OnSafeBrowsingResult(); | 128 result->OnSafeBrowsingResult(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace extensions | 131 } // namespace extensions |
| OLD | NEW |