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

Side by Side Diff: ipc/ipc_message_utils.cc

Issue 4752008: Add proxies for some of the PDF & Flash functionality. There are still a few... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/file_path.h" 7 #include "base/file_path.h"
8 #include "base/json/json_writer.h" 8 #include "base/json/json_writer.h"
9 #include "base/nullable_string16.h" 9 #include "base/nullable_string16.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 void ParamTraits<long long>::Log(const param_type& p, std::string* l) { 228 void ParamTraits<long long>::Log(const param_type& p, std::string* l) {
229 l->append(base::Int64ToString(static_cast<int64>(p))); 229 l->append(base::Int64ToString(static_cast<int64>(p)));
230 } 230 }
231 231
232 void ParamTraits<unsigned long long>::Log(const param_type& p, std::string* l) { 232 void ParamTraits<unsigned long long>::Log(const param_type& p, std::string* l) {
233 l->append(base::Uint64ToString(p)); 233 l->append(base::Uint64ToString(p));
234 } 234 }
235 235
236 void ParamTraits<unsigned short>::Write(Message* m, const param_type& p) {
237 m->WriteBytes(p, sizeof(param_type));
238 }
239
240 bool ParamTraits<unsigned short>::Read(const Message* m, void** iter,
241 param_type* r) {
242 return m->ReadBytes(iter, r, sizeof(param_type));
243 }
244
viettrungluu 2010/11/11 21:09:56 What about Log?
236 void ParamTraits<base::Time>::Write(Message* m, const param_type& p) { 245 void ParamTraits<base::Time>::Write(Message* m, const param_type& p) {
237 ParamTraits<int64>::Write(m, p.ToInternalValue()); 246 ParamTraits<int64>::Write(m, p.ToInternalValue());
238 } 247 }
239 248
240 bool ParamTraits<base::Time>::Read(const Message* m, void** iter, 249 bool ParamTraits<base::Time>::Read(const Message* m, void** iter,
241 param_type* r) { 250 param_type* r) {
242 int64 value; 251 int64 value;
243 if (!ParamTraits<int64>::Read(m, iter, &value)) 252 if (!ParamTraits<int64>::Read(m, iter, &value))
244 return false; 253 return false;
245 *r = base::Time::FromInternalValue(value); 254 *r = base::Time::FromInternalValue(value);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 ReadParam(m, iter, &r->flags) && 455 ReadParam(m, iter, &r->flags) &&
447 ReadParam(m, iter, &r->sent) && 456 ReadParam(m, iter, &r->sent) &&
448 ReadParam(m, iter, &r->receive) && 457 ReadParam(m, iter, &r->receive) &&
449 ReadParam(m, iter, &r->dispatch) && 458 ReadParam(m, iter, &r->dispatch) &&
450 ReadParam(m, iter, &r->params); 459 ReadParam(m, iter, &r->params);
451 r->type = static_cast<uint16>(type); 460 r->type = static_cast<uint16>(type);
452 return result; 461 return result;
453 } 462 }
454 463
455 } // namespace IPC 464 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698