Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: tools/ipc_fuzzer/fuzzer/fuzzer.cc

Issue 1076453003: IPC Fuzzer: Minor fuzz traits updates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/ipc_fuzzer/message_lib/all_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/ipc_fuzzer/fuzzer/fuzzer.cc
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index 43a6c76e46c64ba83314042910cdb765f3a4ad0e..0d39e2b80aea536582b25fec58509100768d56f5 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -1274,6 +1274,20 @@ struct FuzzTraits<GURL> {
}
};
+template <>
+struct FuzzTraits<HostID> {
+ static bool Fuzz(HostID* p, Fuzzer* fuzzer) {
+ HostID::HostType type = p->type();
+ std::string id = p->id();
+ if (!FuzzParam(&type, fuzzer))
+ return false;
+ if (!FuzzParam(&id, fuzzer))
+ return false;
+ *p = HostID(type, id);
+ return true;
+ }
+};
+
#if defined(OS_WIN)
template <>
struct FuzzTraits<HWND> {
« no previous file with comments | « no previous file | tools/ipc_fuzzer/message_lib/all_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698