Index: content/test/fuzzer/clear_site_data_fuzzer.cc |
diff --git a/content/test/fuzzer/clear_site_data_fuzzer.cc b/content/test/fuzzer/clear_site_data_fuzzer.cc |
index a0cc6b27648eabc9620a94ff0b356cc11710c68b..a75719bf547751e71d5947864ffd802160b5d676 100644 |
--- a/content/test/fuzzer/clear_site_data_fuzzer.cc |
+++ b/content/test/fuzzer/clear_site_data_fuzzer.cc |
@@ -10,28 +10,18 @@ |
namespace content { |
-class ClearSiteDataFuzzerTest { |
- public: |
- ClearSiteDataFuzzerTest() : throttle_(nullptr) {} |
- |
- void TestHeader(const std::string& header) { |
- bool remove_cookies; |
- bool remove_storage; |
- bool remove_cache; |
- std::vector<content::ClearSiteDataThrottle::ConsoleMessage> messages; |
- |
- throttle_.ParseHeader(header, &remove_cookies, &remove_storage, |
- &remove_cache, &messages); |
- } |
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
+ std::string header(reinterpret_cast<const char*>(data), size); |
- private: |
- content::ClearSiteDataThrottle throttle_; |
-}; |
+ bool remove_cookies; |
+ bool remove_storage; |
+ bool remove_cache; |
+ ClearSiteDataThrottle::ConsoleMessagesDelegate delegate_; |
-ClearSiteDataFuzzerTest* test = new ClearSiteDataFuzzerTest(); |
+ content::ClearSiteDataThrottle::ParseHeaderForTesting( |
+ header, &remove_cookies, &remove_storage, &remove_cache, &delegate_, |
+ GURL()); |
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { |
- test->TestHeader(std::string(reinterpret_cast<const char*>(data), size)); |
return 0; |
} |