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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 1977643002: Generate param traits size methods for IPC files in chrome/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 years, 7 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
989 if (ret) 989 if (ret)
990 *r = base::TimeTicks::FromInternalValue(value); 990 *r = base::TimeTicks::FromInternalValue(value);
991 991
992 return ret; 992 return ret;
993 } 993 }
994 994
995 void ParamTraits<base::TimeTicks>::Log(const param_type& p, std::string* l) { 995 void ParamTraits<base::TimeTicks>::Log(const param_type& p, std::string* l) {
996 ParamTraits<int64_t>::Log(p.ToInternalValue(), l); 996 ParamTraits<int64_t>::Log(p.ToInternalValue(), l);
997 } 997 }
998 998
999 void ParamTraits<IPC::ChannelHandle>::GetSize(base::PickleSizer* sizer,
1000 const param_type& p) {
1001 GetParamSize(sizer, p.name);
1002 #if defined(OS_POSIX)
1003 GetParamSize(sizer, p.socket);
1004 #endif
1005 }
1006
999 void ParamTraits<IPC::ChannelHandle>::Write(base::Pickle* m, 1007 void ParamTraits<IPC::ChannelHandle>::Write(base::Pickle* m,
1000 const param_type& p) { 1008 const param_type& p) {
1001 #if defined(OS_WIN) 1009 #if defined(OS_WIN)
1002 // On Windows marshalling pipe handle is not supported. 1010 // On Windows marshalling pipe handle is not supported.
1003 DCHECK(p.pipe.handle == NULL); 1011 DCHECK(p.pipe.handle == NULL);
1004 #endif // defined (OS_WIN) 1012 #endif // defined (OS_WIN)
1005 WriteParam(m, p.name); 1013 WriteParam(m, p.name);
1006 #if defined(OS_POSIX) 1014 #if defined(OS_POSIX)
1007 WriteParam(m, p.socket); 1015 WriteParam(m, p.socket);
1008 #endif 1016 #endif
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 return result; 1205 return result;
1198 } 1206 }
1199 1207
1200 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) { 1208 void ParamTraits<MSG>::Log(const param_type& p, std::string* l) {
1201 l->append("<MSG>"); 1209 l->append("<MSG>");
1202 } 1210 }
1203 1211
1204 #endif // OS_WIN 1212 #endif // OS_WIN
1205 1213
1206 } // namespace IPC 1214 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698