| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 return *this; | 51 return *this; |
| 52 } | 52 } |
| 53 | 53 |
| 54 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe( | 54 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe( |
| 55 const std::string& a, const std::string& b, const std::string& c) { | 55 const std::string& a, const std::string& b, const std::string& c) { |
| 56 SetUnsafe(a, b); | 56 SetUnsafe(a, b); |
| 57 unsafe_ids_.insert(c); | 57 unsafe_ids_.insert(c); |
| 58 return *this; | 58 return *this; |
| 59 } | 59 } |
| 60 | 60 |
| 61 FakeSafeBrowsingDatabaseManager& FakeSafeBrowsingDatabaseManager::SetUnsafe( |
| 62 const std::string& a, const std::string& b, const std::string& c, |
| 63 const std::string& d) { |
| 64 SetUnsafe(a, b, c); |
| 65 unsafe_ids_.insert(d); |
| 66 return *this; |
| 67 } |
| 68 |
| 61 void FakeSafeBrowsingDatabaseManager::NotifyUpdate() { | 69 void FakeSafeBrowsingDatabaseManager::NotifyUpdate() { |
| 62 SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true); | 70 SafeBrowsingDatabaseManager::NotifyDatabaseUpdateFinished(true); |
| 63 } | 71 } |
| 64 | 72 |
| 65 bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs( | 73 bool FakeSafeBrowsingDatabaseManager::CheckExtensionIDs( |
| 66 const std::set<std::string>& extension_ids, | 74 const std::set<std::string>& extension_ids, |
| 67 Client* client) { | 75 Client* client) { |
| 68 if (!enabled_) | 76 if (!enabled_) |
| 69 return true; | 77 return true; |
| 70 | 78 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 100 return false; | 108 return false; |
| 101 } | 109 } |
| 102 | 110 |
| 103 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult( | 111 void FakeSafeBrowsingDatabaseManager::OnSafeBrowsingResult( |
| 104 scoped_ptr<SafeBrowsingCheck> result, | 112 scoped_ptr<SafeBrowsingCheck> result, |
| 105 Client* client) { | 113 Client* client) { |
| 106 client->OnSafeBrowsingResult(*result); | 114 client->OnSafeBrowsingResult(*result); |
| 107 } | 115 } |
| 108 | 116 |
| 109 } // namespace extensions | 117 } // namespace extensions |
| OLD | NEW |