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

Side by Side Diff: chrome/tools/ipclist/ipcfuzz.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/tools/convert_dict/convert_dict_unittest.cc ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 5 #include <algorithm>
6 #include <ostream> 6 #include <ostream>
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 virtual void FuzzString(std::string* value) OVERRIDE { 182 virtual void FuzzString(std::string* value) OVERRIDE {
183 FuzzStringType<std::string>(value, frequency_, "BORKED", ""); 183 FuzzStringType<std::string>(value, frequency_, "BORKED", "");
184 } 184 }
185 185
186 virtual void FuzzWString(std::wstring* value) OVERRIDE { 186 virtual void FuzzWString(std::wstring* value) OVERRIDE {
187 FuzzStringType<std::wstring>(value, frequency_, L"BORKED", L""); 187 FuzzStringType<std::wstring>(value, frequency_, L"BORKED", L"");
188 } 188 }
189 189
190 virtual void FuzzString16(string16* value) OVERRIDE { 190 virtual void FuzzString16(string16* value) OVERRIDE {
191 FuzzStringType<string16>(value, frequency_, 191 FuzzStringType<string16>(value, frequency_,
192 WideToUTF16(L"BORKED"), 192 base::WideToUTF16(L"BORKED"),
193 WideToUTF16(L"")); 193 base::WideToUTF16(L""));
194 } 194 }
195 195
196 virtual void FuzzData(char* data, int length) OVERRIDE { 196 virtual void FuzzData(char* data, int length) OVERRIDE {
197 if (rand() % frequency_ == 0) { 197 if (rand() % frequency_ == 0) {
198 for (int i = 0; i < length; ++i) { 198 for (int i = 0; i < length; ++i) {
199 FuzzIntegralType<char>(&data[i], frequency_); 199 FuzzIntegralType<char>(&data[i], frequency_);
200 } 200 }
201 } 201 }
202 } 202 }
203 203
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 684
685 // Entry point avoiding mangled names. 685 // Entry point avoiding mangled names.
686 extern "C" { 686 extern "C" {
687 __attribute__((visibility("default"))) 687 __attribute__((visibility("default")))
688 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void); 688 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void);
689 } 689 }
690 690
691 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void) { 691 IPC::ChannelProxy::OutgoingMessageFilter* GetFilter(void) {
692 return &g_ipcfuzz; 692 return &g_ipcfuzz;
693 } 693 }
OLDNEW
« no previous file with comments | « chrome/tools/convert_dict/convert_dict_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698