1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
|
// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/common/common_param_traits.h"
#include "base/time.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/content_settings.h"
#include "chrome/common/geoposition.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/web_apps.h"
#include "gfx/rect.h"
#include "googleurl/src/gurl.h"
#include "net/base/upload_data.h"
#include "printing/backend/print_backend.h"
#include "printing/native_metafile.h"
#include "printing/page_range.h"
#ifndef EXCLUDE_SKIA_DEPENDENCIES
#include "third_party/skia/include/core/SkBitmap.h"
#endif
#include "webkit/glue/password_form.h"
namespace IPC {
#ifndef EXCLUDE_SKIA_DEPENDENCIES
namespace {
struct SkBitmap_Data {
// The configuration for the bitmap (bits per pixel, etc).
SkBitmap::Config fConfig;
// The width of the bitmap in pixels.
uint32 fWidth;
// The height of the bitmap in pixels.
uint32 fHeight;
void InitSkBitmapDataForTransfer(const SkBitmap& bitmap) {
fConfig = bitmap.config();
fWidth = bitmap.width();
fHeight = bitmap.height();
}
// Returns whether |bitmap| successfully initialized.
bool InitSkBitmapFromData(SkBitmap* bitmap, const char* pixels,
size_t total_pixels) const {
if (total_pixels) {
bitmap->setConfig(fConfig, fWidth, fHeight, 0);
if (!bitmap->allocPixels())
return false;
if (total_pixels != bitmap->getSize())
return false;
memcpy(bitmap->getPixels(), pixels, total_pixels);
}
return true;
}
};
} // namespace
void ParamTraits<SkBitmap>::Write(Message* m, const SkBitmap& p) {
size_t fixed_size = sizeof(SkBitmap_Data);
SkBitmap_Data bmp_data;
bmp_data.InitSkBitmapDataForTransfer(p);
m->WriteData(reinterpret_cast<const char*>(&bmp_data),
static_cast<int>(fixed_size));
size_t pixel_size = p.getSize();
SkAutoLockPixels p_lock(p);
m->WriteData(reinterpret_cast<const char*>(p.getPixels()),
static_cast<int>(pixel_size));
}
bool ParamTraits<SkBitmap>::Read(const Message* m, void** iter, SkBitmap* r) {
const char* fixed_data;
int fixed_data_size = 0;
if (!m->ReadData(iter, &fixed_data, &fixed_data_size) ||
(fixed_data_size <= 0)) {
NOTREACHED();
return false;
}
if (fixed_data_size != sizeof(SkBitmap_Data))
return false; // Message is malformed.
const char* variable_data;
int variable_data_size = 0;
if (!m->ReadData(iter, &variable_data, &variable_data_size) ||
(variable_data_size < 0)) {
NOTREACHED();
return false;
}
const SkBitmap_Data* bmp_data =
reinterpret_cast<const SkBitmap_Data*>(fixed_data);
return bmp_data->InitSkBitmapFromData(r, variable_data, variable_data_size);
}
void ParamTraits<SkBitmap>::Log(const SkBitmap& p, std::string* l) {
l->append("<SkBitmap>");
}
#endif // EXCLUDE_SKIA_DEPENDENCIES
void ParamTraits<GURL>::Write(Message* m, const GURL& p) {
m->WriteString(p.possibly_invalid_spec());
// TODO(brettw) bug 684583: Add encoding for query params.
}
bool ParamTraits<GURL>::Read(const Message* m, void** iter, GURL* p) {
std::string s;
if (!m->ReadString(iter, &s) || s.length() > chrome::kMaxURLChars) {
*p = GURL();
return false;
}
*p = GURL(s);
return true;
}
void ParamTraits<GURL>::Log(const GURL& p, std::string* l) {
l->append(p.spec());
}
void ParamTraits<gfx::Point>::Write(Message* m, const gfx::Point& p) {
m->WriteInt(p.x());
m->WriteInt(p.y());
}
bool ParamTraits<gfx::Point>::Read(const Message* m, void** iter,
gfx::Point* r) {
int x, y;
if (!m->ReadInt(iter, &x) ||
!m->ReadInt(iter, &y))
return false;
r->set_x(x);
r->set_y(y);
return true;
}
void ParamTraits<gfx::Point>::Log(const gfx::Point& p, std::string* l) {
l->append(base::StringPrintf("(%d, %d)", p.x(), p.y()));
}
void ParamTraits<gfx::Rect>::Write(Message* m, const gfx::Rect& p) {
m->WriteInt(p.x());
m->WriteInt(p.y());
m->WriteInt(p.width());
m->WriteInt(p.height());
}
bool ParamTraits<gfx::Rect>::Read(const Message* m, void** iter, gfx::Rect* r) {
int x, y, w, h;
if (!m->ReadInt(iter, &x) ||
!m->ReadInt(iter, &y) ||
!m->ReadInt(iter, &w) ||
!m->ReadInt(iter, &h))
return false;
r->set_x(x);
r->set_y(y);
r->set_width(w);
r->set_height(h);
return true;
}
void ParamTraits<gfx::Rect>::Log(const gfx::Rect& p, std::string* l) {
l->append(base::StringPrintf("(%d, %d, %d, %d)", p.x(), p.y(),
p.width(), p.height()));
}
void ParamTraits<gfx::Size>::Write(Message* m, const gfx::Size& p) {
m->WriteInt(p.width());
m->WriteInt(p.height());
}
bool ParamTraits<gfx::Size>::Read(const Message* m, void** iter, gfx::Size* r) {
int w, h;
if (!m->ReadInt(iter, &w) ||
!m->ReadInt(iter, &h))
return false;
r->set_width(w);
r->set_height(h);
return true;
}
void ParamTraits<gfx::Size>::Log(const gfx::Size& p, std::string* l) {
l->append(base::StringPrintf("(%d, %d)", p.width(), p.height()));
}
void ParamTraits<ContentSetting>::Write(Message* m, const param_type& p) {
WriteParam(m, static_cast<int>(p));
}
bool ParamTraits<ContentSetting>::Read(const Message* m, void** iter,
param_type* r) {
int value;
if (!ReadParam(m, iter, &value))
return false;
if (value < 0 || value >= static_cast<int>(CONTENT_SETTING_NUM_SETTINGS))
return false;
*r = static_cast<param_type>(value);
return true;
}
void ParamTraits<ContentSetting>::Log(const param_type& p, std::string* l) {
LogParam(static_cast<int>(p), l);
}
void ParamTraits<ContentSettings>::Write(
Message* m, const ContentSettings& settings) {
for (size_t i = 0; i < arraysize(settings.settings); ++i)
WriteParam(m, settings.settings[i]);
}
bool ParamTraits<ContentSettings>::Read(
const Message* m, void** iter, ContentSettings* r) {
for (size_t i = 0; i < arraysize(r->settings); ++i) {
if (!ReadParam(m, iter, &r->settings[i]))
return false;
}
return true;
}
void ParamTraits<ContentSettings>::Log(
const ContentSettings& p, std::string* l) {
l->append("<ContentSettings>");
}
void ParamTraits<WebApplicationInfo>::Write(Message* m,
const WebApplicationInfo& p) {
WriteParam(m, p.title);
WriteParam(m, p.description);
WriteParam(m, p.app_url);
WriteParam(m, p.launch_container);
WriteParam(m, p.icons.size());
WriteParam(m, p.permissions.size());
for (size_t i = 0; i < p.icons.size(); ++i) {
WriteParam(m, p.icons[i].url);
WriteParam(m, p.icons[i].width);
WriteParam(m, p.icons[i].height);
WriteParam(m, p.icons[i].data);
}
for (size_t i = 0; i < p.permissions.size(); ++i)
WriteParam(m, p.permissions[i]);
}
bool ParamTraits<WebApplicationInfo>::Read(
const Message* m, void** iter, WebApplicationInfo* r) {
size_t icon_count = 0;
size_t permissions_count = 0;
bool result =
ReadParam(m, iter, &r->title) &&
ReadParam(m, iter, &r->description) &&
ReadParam(m, iter, &r->app_url) &&
ReadParam(m, iter, &r->launch_container) &&
ReadParam(m, iter, &icon_count) &&
ReadParam(m, iter, &permissions_count);
if (!result)
return false;
for (size_t i = 0; i < icon_count; ++i) {
param_type::IconInfo icon_info;
result =
ReadParam(m, iter, &icon_info.url) &&
ReadParam(m, iter, &icon_info.width) &&
ReadParam(m, iter, &icon_info.height) &&
ReadParam(m, iter, &icon_info.data);
if (!result)
return false;
r->icons.push_back(icon_info);
}
for (size_t i = 0; i < permissions_count; ++i) {
std::string permission;
if (!ReadParam(m, iter, &permission))
return false;
r->permissions.push_back(permission);
}
return true;
}
void ParamTraits<WebApplicationInfo>::Log(const WebApplicationInfo& p,
std::string* l) {
l->append("<WebApplicationInfo>");
}
void ParamTraits<URLRequestStatus>::Write(Message* m, const param_type& p) {
WriteParam(m, static_cast<int>(p.status()));
WriteParam(m, p.os_error());
}
bool ParamTraits<URLRequestStatus>::Read(const Message* m, void** iter,
param_type* r) {
int status, os_error;
if (!ReadParam(m, iter, &status) ||
!ReadParam(m, iter, &os_error))
return false;
r->set_status(static_cast<URLRequestStatus::Status>(status));
r->set_os_error(os_error);
return true;
}
void ParamTraits<URLRequestStatus>::Log(const param_type& p, std::string* l) {
std::string status;
switch (p.status()) {
case URLRequestStatus::SUCCESS:
status = "SUCCESS";
break;
case URLRequestStatus::IO_PENDING:
status = "IO_PENDING ";
break;
case URLRequestStatus::HANDLED_EXTERNALLY:
status = "HANDLED_EXTERNALLY";
break;
case URLRequestStatus::CANCELED:
status = "CANCELED";
break;
case URLRequestStatus::FAILED:
status = "FAILED";
break;
default:
status = "UNKNOWN";
break;
}
if (p.status() == URLRequestStatus::FAILED)
l->append("(");
LogParam(status, l);
if (p.status() == URLRequestStatus::FAILED) {
l->append(", ");
LogParam(p.os_error(), l);
l->append(")");
}
}
// Only the net::UploadData ParamTraits<> definition needs this definition, so
// keep this in the implementation file so we can forward declare UploadData in
// the header.
template <>
struct ParamTraits<net::UploadData::Element> {
typedef net::UploadData::Element param_type;
static void Write(Message* m, const param_type& p) {
WriteParam(m, static_cast<int>(p.type()));
if (p.type() == net::UploadData::TYPE_BYTES) {
m->WriteData(&p.bytes()[0], static_cast<int>(p.bytes().size()));
} else if (p.type() == net::UploadData::TYPE_FILE) {
WriteParam(m, p.file_path());
WriteParam(m, p.file_range_offset());
WriteParam(m, p.file_range_length());
WriteParam(m, p.expected_file_modification_time());
} else {
WriteParam(m, p.blob_url());
}
}
static bool Read(const Message* m, void** iter, param_type* r) {
int type;
if (!ReadParam(m, iter, &type))
return false;
if (type == net::UploadData::TYPE_BYTES) {
const char* data;
int len;
if (!m->ReadData(iter, &data, &len))
return false;
r->SetToBytes(data, len);
} else if (type == net::UploadData::TYPE_FILE) {
FilePath file_path;
uint64 offset, length;
base::Time expected_modification_time;
if (!ReadParam(m, iter, &file_path))
return false;
if (!ReadParam(m, iter, &offset))
return false;
if (!ReadParam(m, iter, &length))
return false;
if (!ReadParam(m, iter, &expected_modification_time))
return false;
r->SetToFilePathRange(file_path, offset, length,
expected_modification_time);
} else {
DCHECK(type == net::UploadData::TYPE_BLOB);
GURL blob_url;
if (!ReadParam(m, iter, &blob_url))
return false;
r->SetToBlobUrl(blob_url);
}
return true;
}
static void Log(const param_type& p, std::string* l) {
l->append("<net::UploadData::Element>");
}
};
void ParamTraits<scoped_refptr<net::UploadData> >::Write(Message* m,
const param_type& p) {
WriteParam(m, p.get() != NULL);
if (p) {
WriteParam(m, *p->elements());
WriteParam(m, p->identifier());
}
}
bool ParamTraits<scoped_refptr<net::UploadData> >::Read(const Message* m,
void** iter,
param_type* r) {
bool has_object;
if (!ReadParam(m, iter, &has_object))
return false;
if (!has_object)
return true;
std::vector<net::UploadData::Element> elements;
if (!ReadParam(m, iter, &elements))
return false;
int64 identifier;
if (!ReadParam(m, iter, &identifier))
return false;
*r = new net::UploadData;
(*r)->swap_elements(&elements);
(*r)->set_identifier(identifier);
return true;
}
void ParamTraits<scoped_refptr<net::UploadData> >::Log(const param_type& p,
std::string* l) {
l->append("<net::UploadData>");
}
void ParamTraits<ThumbnailScore>::Write(Message* m, const param_type& p) {
IPC::ParamTraits<double>::Write(m, p.boring_score);
IPC::ParamTraits<bool>::Write(m, p.good_clipping);
IPC::ParamTraits<bool>::Write(m, p.at_top);
IPC::ParamTraits<base::Time>::Write(m, p.time_at_snapshot);
}
bool ParamTraits<ThumbnailScore>::Read(const Message* m, void** iter,
param_type* r) {
double boring_score;
bool good_clipping, at_top;
base::Time time_at_snapshot;
if (!IPC::ParamTraits<double>::Read(m, iter, &boring_score) ||
!IPC::ParamTraits<bool>::Read(m, iter, &good_clipping) ||
!IPC::ParamTraits<bool>::Read(m, iter, &at_top) ||
!IPC::ParamTraits<base::Time>::Read(m, iter, &time_at_snapshot))
return false;
r->boring_score = boring_score;
r->good_clipping = good_clipping;
r->at_top = at_top;
r->time_at_snapshot = time_at_snapshot;
return true;
}
void ParamTraits<ThumbnailScore>::Log(const param_type& p, std::string* l) {
l->append(base::StringPrintf("(%f, %d, %d)",
p.boring_score, p.good_clipping, p.at_top));
}
template <>
struct ParamTraits<Geoposition::ErrorCode> {
typedef Geoposition::ErrorCode param_type;
static void Write(Message* m, const param_type& p) {
int error_code = p;
WriteParam(m, error_code);
}
static bool Read(const Message* m, void** iter, param_type* p) {
int error_code_param = 0;
bool ret = ReadParam(m, iter, &error_code_param);
*p = static_cast<Geoposition::ErrorCode>(error_code_param);
return ret;
}
static void Log(const param_type& p, std::string* l) {
int error_code = p;
l->append(base::StringPrintf("<Geoposition::ErrorCode>%d", error_code));
}
};
void ParamTraits<Geoposition>::Write(Message* m, const Geoposition& p) {
WriteParam(m, p.latitude);
WriteParam(m, p.longitude);
WriteParam(m, p.accuracy);
WriteParam(m, p.altitude);
WriteParam(m, p.altitude_accuracy);
WriteParam(m, p.speed);
WriteParam(m, p.heading);
WriteParam(m, p.timestamp);
WriteParam(m, p.error_code);
WriteParam(m, p.error_message);
}
bool ParamTraits<Geoposition>::Read(
const Message* m, void** iter, Geoposition* p) {
bool ret = ReadParam(m, iter, &p->latitude);
ret = ret && ReadParam(m, iter, &p->longitude);
ret = ret && ReadParam(m, iter, &p->accuracy);
ret = ret && ReadParam(m, iter, &p->altitude);
ret = ret && ReadParam(m, iter, &p->altitude_accuracy);
ret = ret && ReadParam(m, iter, &p->speed);
ret = ret && ReadParam(m, iter, &p->heading);
ret = ret && ReadParam(m, iter, &p->timestamp);
ret = ret && ReadParam(m, iter, &p->error_code);
ret = ret && ReadParam(m, iter, &p->error_message);
return ret;
}
void ParamTraits<Geoposition>::Log(const Geoposition& p, std::string* l) {
l->append(
base::StringPrintf(
"<Geoposition>"
"%.6f %.6f %.6f %.6f "
"%.6f %.6f %.6f ",
p.latitude, p.longitude, p.accuracy, p.altitude,
p.altitude_accuracy, p.speed, p.heading));
LogParam(p.timestamp, l);
l->append(" ");
l->append(p.error_message);
LogParam(p.error_code, l);
}
void ParamTraits<webkit_glue::PasswordForm>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.signon_realm);
WriteParam(m, p.origin);
WriteParam(m, p.action);
WriteParam(m, p.submit_element);
WriteParam(m, p.username_element);
WriteParam(m, p.username_value);
WriteParam(m, p.password_element);
WriteParam(m, p.password_value);
WriteParam(m, p.old_password_element);
WriteParam(m, p.old_password_value);
WriteParam(m, p.ssl_valid);
WriteParam(m, p.preferred);
WriteParam(m, p.blacklisted_by_user);
}
bool ParamTraits<webkit_glue::PasswordForm>::Read(const Message* m, void** iter,
param_type* p) {
return
ReadParam(m, iter, &p->signon_realm) &&
ReadParam(m, iter, &p->origin) &&
ReadParam(m, iter, &p->action) &&
ReadParam(m, iter, &p->submit_element) &&
ReadParam(m, iter, &p->username_element) &&
ReadParam(m, iter, &p->username_value) &&
ReadParam(m, iter, &p->password_element) &&
ReadParam(m, iter, &p->password_value) &&
ReadParam(m, iter, &p->old_password_element) &&
ReadParam(m, iter, &p->old_password_value) &&
ReadParam(m, iter, &p->ssl_valid) &&
ReadParam(m, iter, &p->preferred) &&
ReadParam(m, iter, &p->blacklisted_by_user);
}
void ParamTraits<webkit_glue::PasswordForm>::Log(const param_type& p,
std::string* l) {
l->append("<PasswordForm>");
}
void ParamTraits<printing::PageRange>::Write(Message* m, const param_type& p) {
WriteParam(m, p.from);
WriteParam(m, p.to);
}
bool ParamTraits<printing::PageRange>::Read(
const Message* m, void** iter, param_type* p) {
return ReadParam(m, iter, &p->from) &&
ReadParam(m, iter, &p->to);
}
void ParamTraits<printing::PageRange>::Log(
const param_type& p, std::string* l) {
l->append("(");
LogParam(p.to, l);
l->append(", ");
LogParam(p.from, l);
l->append(")");
}
void ParamTraits<printing::NativeMetafile>::Write(
Message* m, const param_type& p) {
std::vector<uint8> buffer;
uint32 size = p.GetDataSize();
if (size) {
buffer.resize(size);
p.GetData(&buffer.front(), size);
}
WriteParam(m, buffer);
}
bool ParamTraits<printing::NativeMetafile>::Read(
const Message* m, void** iter, param_type* p) {
std::vector<uint8> buffer;
return ReadParam(m, iter, &buffer) &&
p->Init(&buffer.front(), static_cast<uint32>(buffer.size()));
}
void ParamTraits<printing::NativeMetafile>::Log(
const param_type& p, std::string* l) {
l->append("<printing::NativeMetafile>");
}
void ParamTraits<base::PlatformFileInfo>::Write(
Message* m, const param_type& p) {
WriteParam(m, p.size);
WriteParam(m, p.is_directory);
WriteParam(m, p.last_modified.ToDoubleT());
WriteParam(m, p.last_accessed.ToDoubleT());
WriteParam(m, p.creation_time.ToDoubleT());
}
bool ParamTraits<base::PlatformFileInfo>::Read(
const Message* m, void** iter, param_type* p) {
double last_modified;
double last_accessed;
double creation_time;
bool result =
ReadParam(m, iter, &p->size) &&
ReadParam(m, iter, &p->is_directory) &&
ReadParam(m, iter, &last_modified) &&
ReadParam(m, iter, &last_accessed) &&
ReadParam(m, iter, &creation_time);
if (result) {
p->last_modified = base::Time::FromDoubleT(last_modified);
p->last_accessed = base::Time::FromDoubleT(last_accessed);
p->creation_time = base::Time::FromDoubleT(creation_time);
}
return result;
}
void ParamTraits<base::PlatformFileInfo>::Log(
const param_type& p, std::string* l) {
l->append("(");
LogParam(p.size, l);
l->append(",");
LogParam(p.is_directory, l);
l->append(",");
LogParam(p.last_modified.ToDoubleT(), l);
l->append(",");
LogParam(p.last_accessed.ToDoubleT(), l);
l->append(",");
LogParam(p.creation_time.ToDoubleT(), l);
l->append(")");
}
void ParamTraits<printing::PrinterCapsAndDefaults>::Write(
Message* m, const param_type& p) {
WriteParam(m, p.printer_capabilities);
WriteParam(m, p.caps_mime_type);
WriteParam(m, p.printer_defaults);
WriteParam(m, p.defaults_mime_type);
}
bool ParamTraits<printing::PrinterCapsAndDefaults>::Read(
const Message* m, void** iter, param_type* p) {
return
ReadParam(m, iter, &p->printer_capabilities) &&
ReadParam(m, iter, &p->caps_mime_type) &&
ReadParam(m, iter, &p->printer_defaults) &&
ReadParam(m, iter, &p->defaults_mime_type);
}
void ParamTraits<printing::PrinterCapsAndDefaults>::Log(
const param_type& p, std::string* l) {
l->append("(");
LogParam(p.printer_capabilities, l);
l->append(",");
LogParam(p.caps_mime_type, l);
l->append(",");
LogParam(p.printer_defaults, l);
l->append(",");
LogParam(p.defaults_mime_type, l);
l->append(")");
}
} // namespace IPC
|