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

Side by Side Diff: chrome/common/common_param_traits.cc

Issue 6709009: Stop overloading Init() in NativeMetafile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/renderer/mock_printer.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/common/common_param_traits.h" 5 #include "chrome/common/common_param_traits.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "chrome/common/chrome_constants.h" 8 #include "chrome/common/chrome_constants.h"
9 #include "chrome/common/content_settings.h" 9 #include "chrome/common/content_settings.h"
10 #include "chrome/common/thumbnail_score.h" 10 #include "chrome/common/thumbnail_score.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 buffer.resize(size); 361 buffer.resize(size);
362 p.GetData(&buffer.front(), size); 362 p.GetData(&buffer.front(), size);
363 } 363 }
364 WriteParam(m, buffer); 364 WriteParam(m, buffer);
365 } 365 }
366 366
367 bool ParamTraits<printing::NativeMetafile>::Read( 367 bool ParamTraits<printing::NativeMetafile>::Read(
368 const Message* m, void** iter, param_type* p) { 368 const Message* m, void** iter, param_type* p) {
369 std::vector<uint8> buffer; 369 std::vector<uint8> buffer;
370 return ReadParam(m, iter, &buffer) && 370 return ReadParam(m, iter, &buffer) &&
371 p->Init(&buffer.front(), static_cast<uint32>(buffer.size())); 371 p->InitFromData(&buffer.front(), static_cast<uint32>(buffer.size()));
372 } 372 }
373 373
374 void ParamTraits<printing::NativeMetafile>::Log( 374 void ParamTraits<printing::NativeMetafile>::Log(
375 const param_type& p, std::string* l) { 375 const param_type& p, std::string* l) {
376 l->append("<printing::NativeMetafile>"); 376 l->append("<printing::NativeMetafile>");
377 } 377 }
378 378
379 void ParamTraits<printing::PrinterCapsAndDefaults>::Write( 379 void ParamTraits<printing::PrinterCapsAndDefaults>::Write(
380 Message* m, const param_type& p) { 380 Message* m, const param_type& p) {
381 WriteParam(m, p.printer_capabilities); 381 WriteParam(m, p.printer_capabilities);
(...skipping 18 matching lines...) Expand all
400 l->append(","); 400 l->append(",");
401 LogParam(p.caps_mime_type, l); 401 LogParam(p.caps_mime_type, l);
402 l->append(","); 402 l->append(",");
403 LogParam(p.printer_defaults, l); 403 LogParam(p.printer_defaults, l);
404 l->append(","); 404 l->append(",");
405 LogParam(p.defaults_mime_type, l); 405 LogParam(p.defaults_mime_type, l);
406 l->append(")"); 406 l->append(")");
407 } 407 }
408 408
409 } // namespace IPC 409 } // namespace IPC
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager.cc ('k') | chrome/renderer/mock_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698