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

Side by Side Diff: tools/ipc_fuzzer/mutate/generate.cc

Issue 888163002: Account for the renaming of the dns_prefetch namespace to network_hints. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iostream> 8 #include <iostream>
9 #include <ostream> 9 #include <ostream>
10 #include <set> 10 #include <set>
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
945 static bool Generate(content::PageState *p, Generator* generator) { 945 static bool Generate(content::PageState *p, Generator* generator) {
946 std::string junk; 946 std::string junk;
947 if (!GenerateParam(&junk, generator)) 947 if (!GenerateParam(&junk, generator))
948 return false; 948 return false;
949 *p = content::PageState::CreateFromEncodedData(junk); 949 *p = content::PageState::CreateFromEncodedData(junk);
950 return true; 950 return true;
951 } 951 }
952 }; 952 };
953 953
954 template <> 954 template <>
955 struct GenerateTraits<dns_prefetch::LookupRequest> {
956 static bool Generate(dns_prefetch::LookupRequest* p, Generator* generator) {
957 dns_prefetch::LookupRequest request;
958 if (!GenerateParam(&request.hostname_list, generator))
959 return false;
960 *p = request;
961 return true;
962 }
963 };
964
965 template <>
966 struct GenerateTraits<extensions::URLPatternSet> { 955 struct GenerateTraits<extensions::URLPatternSet> {
967 static bool Generate(extensions::URLPatternSet* p, Generator* generator) { 956 static bool Generate(extensions::URLPatternSet* p, Generator* generator) {
968 std::set<URLPattern> patterns; 957 std::set<URLPattern> patterns;
969 if (!GenerateParam(&patterns, generator)) 958 if (!GenerateParam(&patterns, generator))
970 return false; 959 return false;
971 *p = extensions::URLPatternSet(patterns); 960 *p = extensions::URLPatternSet(patterns);
972 return true; 961 return true;
973 } 962 }
974 }; 963 };
975 964
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1137 return false; 1126 return false;
1138 if (!GenerateParam(&port, generator)) 1127 if (!GenerateParam(&port, generator))
1139 return false; 1128 return false;
1140 net::IPEndPoint ip_endpoint(address, port); 1129 net::IPEndPoint ip_endpoint(address, port);
1141 *p = ip_endpoint; 1130 *p = ip_endpoint;
1142 return true; 1131 return true;
1143 } 1132 }
1144 }; 1133 };
1145 1134
1146 template <> 1135 template <>
1136 struct GenerateTraits<network_hints::LookupRequest> {
1137 static bool Generate(network_hints::LookupRequest* p, Generator* generator) {
1138 network_hints::LookupRequest request;
1139 if (!GenerateParam(&request.hostname_list, generator))
1140 return false;
1141 *p = request;
1142 return true;
1143 }
1144 };
1145
1146 template <>
1147 struct GenerateTraits<gfx::Point> { 1147 struct GenerateTraits<gfx::Point> {
1148 static bool Generate(gfx::Point *p, Generator* generator) { 1148 static bool Generate(gfx::Point *p, Generator* generator) {
1149 int x; 1149 int x;
1150 int y; 1150 int y;
1151 if (!GenerateParam(&x, generator)) 1151 if (!GenerateParam(&x, generator))
1152 return false; 1152 return false;
1153 if (!GenerateParam(&y, generator)) 1153 if (!GenerateParam(&y, generator))
1154 return false; 1154 return false;
1155 p->SetPoint(x, y); 1155 p->SetPoint(x, y);
1156 return true; 1156 return true;
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1771 return EXIT_FAILURE; 1771 return EXIT_FAILURE;
1772 1772
1773 return EXIT_SUCCESS; 1773 return EXIT_SUCCESS;
1774 } 1774 }
1775 1775
1776 } // namespace ipc_fuzzer 1776 } // namespace ipc_fuzzer
1777 1777
1778 int main(int argc, char** argv) { 1778 int main(int argc, char** argv) {
1779 return ipc_fuzzer::GenerateMain(argc, argv); 1779 return ipc_fuzzer::GenerateMain(argc, argv);
1780 } 1780 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698