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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 | « ipc/ipc_channel_win.cc ('k') | media/audio/win/audio_device_listener_win.cc » ('j') | 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 "ipc/ipc_message_utils.h" 5 #include "ipc/ipc_message_utils.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/nullable_string16.h" 10 #include "base/strings/nullable_string16.h"
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 void ParamTraits<double>::Log(const param_type& p, std::string* l) { 333 void ParamTraits<double>::Log(const param_type& p, std::string* l) {
334 l->append(base::StringPrintf("%e", p)); 334 l->append(base::StringPrintf("%e", p));
335 } 335 }
336 336
337 337
338 void ParamTraits<std::string>::Log(const param_type& p, std::string* l) { 338 void ParamTraits<std::string>::Log(const param_type& p, std::string* l) {
339 l->append(p); 339 l->append(p);
340 } 340 }
341 341
342 void ParamTraits<std::wstring>::Log(const param_type& p, std::string* l) { 342 void ParamTraits<std::wstring>::Log(const param_type& p, std::string* l) {
343 l->append(WideToUTF8(p)); 343 l->append(base::WideToUTF8(p));
344 } 344 }
345 345
346 #if !defined(WCHAR_T_IS_UTF16) 346 #if !defined(WCHAR_T_IS_UTF16)
347 void ParamTraits<base::string16>::Log(const param_type& p, std::string* l) { 347 void ParamTraits<base::string16>::Log(const param_type& p, std::string* l) {
348 l->append(UTF16ToUTF8(p)); 348 l->append(base::UTF16ToUTF8(p));
349 } 349 }
350 #endif 350 #endif
351 351
352 void ParamTraits<std::vector<char> >::Write(Message* m, const param_type& p) { 352 void ParamTraits<std::vector<char> >::Write(Message* m, const param_type& p) {
353 if (p.empty()) { 353 if (p.empty()) {
354 m->WriteData(NULL, 0); 354 m->WriteData(NULL, 0);
355 } else { 355 } else {
356 m->WriteData(&p.front(), static_cast<int>(p.size())); 356 m->WriteData(&p.front(), static_cast<int>(p.size()));
357 } 357 }
358 } 358 }
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
823 return result; 823 return result;
824 } 824 }
825 825
826 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { 826 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) {
827 l->append("<MSG>"); 827 l->append("<MSG>");
828 } 828 }
829 829
830 #endif // OS_WIN 830 #endif // OS_WIN
831 831
832 } // namespace IPC 832 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | media/audio/win/audio_device_listener_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698