| 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 #ifndef CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Return |this| to chain together SetUnsafe(...).NotifyUpdate() conveniently. | 29 // Return |this| to chain together SetUnsafe(...).NotifyUpdate() conveniently. |
| 30 FakeSafeBrowsingDatabaseManager& Enable(); | 30 FakeSafeBrowsingDatabaseManager& Enable(); |
| 31 FakeSafeBrowsingDatabaseManager& ClearUnsafe(); | 31 FakeSafeBrowsingDatabaseManager& ClearUnsafe(); |
| 32 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a); | 32 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a); |
| 33 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a, | 33 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a, |
| 34 const std::string& b); | 34 const std::string& b); |
| 35 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a, | 35 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a, |
| 36 const std::string& b, | 36 const std::string& b, |
| 37 const std::string& c); | 37 const std::string& c); |
| 38 FakeSafeBrowsingDatabaseManager& SetUnsafe(const std::string& a, |
| 39 const std::string& b, |
| 40 const std::string& c, |
| 41 const std::string& d); |
| 38 | 42 |
| 39 // Send the update notification. | 43 // Send the update notification. |
| 40 void NotifyUpdate(); | 44 void NotifyUpdate(); |
| 41 | 45 |
| 42 private: | 46 private: |
| 43 virtual ~FakeSafeBrowsingDatabaseManager(); | 47 virtual ~FakeSafeBrowsingDatabaseManager(); |
| 44 | 48 |
| 45 // Runs client->SafeBrowsingResult(result). | 49 // Runs client->SafeBrowsingResult(result). |
| 46 void OnSafeBrowsingResult(scoped_ptr<SafeBrowsingCheck> result, | 50 void OnSafeBrowsingResult(scoped_ptr<SafeBrowsingCheck> result, |
| 47 Client* client); | 51 Client* client); |
| 48 | 52 |
| 49 // Whether to respond to CheckExtensionIDs immediately with true (indicating | 53 // Whether to respond to CheckExtensionIDs immediately with true (indicating |
| 50 // that there is definitely no extension ID match). | 54 // that there is definitely no extension ID match). |
| 51 bool enabled_; | 55 bool enabled_; |
| 52 | 56 |
| 53 // The extension IDs considered unsafe. | 57 // The extension IDs considered unsafe. |
| 54 std::set<std::string> unsafe_ids_; | 58 std::set<std::string> unsafe_ids_; |
| 55 }; | 59 }; |
| 56 | 60 |
| 57 } // namespace extensions | 61 } // namespace extensions |
| 58 | 62 |
| 59 #endif // CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ | 63 #endif // CHROME_BROWSER_EXTENSIONS_FAKE_SAFE_BROWSING_DATABASE_MANAGER_H_ |
| OLD | NEW |