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

Side by Side Diff: ipc/ipc_message_utils.h

Issue 678001: base: string_util.h -> utf_string_conversions.h fix. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 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 | « base/utf_string_conversions_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef IPC_IPC_MESSAGE_UTILS_H_ 5 #ifndef IPC_IPC_MESSAGE_UTILS_H_
6 #define IPC_IPC_MESSAGE_UTILS_H_ 6 #define IPC_IPC_MESSAGE_UTILS_H_
7 7
8 #include <algorithm>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 #include <map> 11 #include <map>
11 12
12 #include "base/file_path.h" 13 #include "base/file_path.h"
13 #include "base/format_macros.h" 14 #include "base/format_macros.h"
14 #include "base/nullable_string16.h" 15 #include "base/nullable_string16.h"
15 #include "base/string16.h" 16 #include "base/string16.h"
16 #include "base/string_util.h" 17 #include "base/string_util.h"
18 #include "base/utf_string_conversions.h"
17 #include "base/time.h" 19 #include "base/time.h"
18 #include "base/tuple.h" 20 #include "base/tuple.h"
19 #include "base/values.h" 21 #include "base/values.h"
20 #if defined(OS_POSIX) 22 #if defined(OS_POSIX)
21 #include "ipc/file_descriptor_set_posix.h" 23 #include "ipc/file_descriptor_set_posix.h"
22 #endif 24 #endif
23 #include "ipc/ipc_channel_handle.h" 25 #include "ipc/ipc_channel_handle.h"
24 #include "ipc/ipc_sync_message.h" 26 #include "ipc/ipc_sync_message.h"
25 27
26 // Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique 28 // Used by IPC_BEGIN_MESSAGES so that each message class starts from a unique
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 return m->ReadFileDescriptor(iter, r); 708 return m->ReadFileDescriptor(iter, r);
707 } 709 }
708 static void Log(const param_type& p, std::wstring* l) { 710 static void Log(const param_type& p, std::wstring* l) {
709 if (p.auto_close) { 711 if (p.auto_close) {
710 l->append(StringPrintf(L"FD(%d auto-close)", p.fd)); 712 l->append(StringPrintf(L"FD(%d auto-close)", p.fd));
711 } else { 713 } else {
712 l->append(StringPrintf(L"FD(%d)", p.fd)); 714 l->append(StringPrintf(L"FD(%d)", p.fd));
713 } 715 }
714 } 716 }
715 }; 717 };
716 #endif // defined(OS_POSIX) 718 #endif // defined(OS_POSIX)
717 719
718 // A ChannelHandle is basically a platform-inspecific wrapper around the 720 // A ChannelHandle is basically a platform-inspecific wrapper around the
719 // fact that IPC endpoints are handled specially on POSIX. See above comments 721 // fact that IPC endpoints are handled specially on POSIX. See above comments
720 // on FileDescriptor for more background. 722 // on FileDescriptor for more background.
721 template<> 723 template<>
722 struct ParamTraits<IPC::ChannelHandle> { 724 struct ParamTraits<IPC::ChannelHandle> {
723 typedef ChannelHandle param_type; 725 typedef ChannelHandle param_type;
724 static void Write(Message* m, const param_type& p) { 726 static void Write(Message* m, const param_type& p) {
725 WriteParam(m, p.name); 727 WriteParam(m, p.name);
726 #if defined(OS_POSIX) 728 #if defined(OS_POSIX)
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 ReplyParam p(a, b, c, d, e); 1253 ReplyParam p(a, b, c, d, e);
1252 WriteParam(reply, p); 1254 WriteParam(reply, p);
1253 } 1255 }
1254 }; 1256 };
1255 1257
1256 //----------------------------------------------------------------------------- 1258 //-----------------------------------------------------------------------------
1257 1259
1258 } // namespace IPC 1260 } // namespace IPC
1259 1261
1260 #endif // IPC_IPC_MESSAGE_UTILS_H_ 1262 #endif // IPC_IPC_MESSAGE_UTILS_H_
OLDNEW
« no previous file with comments | « base/utf_string_conversions_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698