Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/chromeos/printing/cups_print_job.h" | |
| 6 | |
| 7 #include "base/strings/string_number_conversions.h" | |
| 8 | |
| 9 namespace chromeos { | |
| 10 | |
| 11 CUPSPrintJob::CUPSPrintJob(const std::string& printer_id, | |
| 12 int job_id, | |
| 13 const std::string& document_title, | |
| 14 int total_page_number) | |
| 15 : printer_(Printer(printer_id)), | |
| 16 job_id_(job_id), | |
| 17 document_title_(document_title), | |
| 18 total_page_number_(total_page_number) {} | |
|
stevenjb
2016/10/26 19:59:57
Can we eliminate this and just make callers do the
xdai1
2016/10/26 22:55:18
Done.
| |
| 19 | |
| 20 CUPSPrintJob::CUPSPrintJob(const Printer& printer, | |
| 21 int job_id, | |
| 22 const std::string& document_title, | |
| 23 int total_page_number) | |
| 24 : printer_(printer), | |
| 25 job_id_(job_id), | |
| 26 document_title_(document_title), | |
| 27 total_page_number_(total_page_number) {} | |
| 28 | |
| 29 CUPSPrintJob::~CUPSPrintJob() {} | |
| 30 | |
| 31 std::string CUPSPrintJob::GetId() const { | |
| 32 return printer_.id() + base::IntToString(job_id_); | |
| 33 } | |
| 34 | |
| 35 Printer* CUPSPrintJob::GetPrinter() { | |
| 36 return &printer_; | |
| 37 } | |
| 38 | |
| 39 } // namespace chromeos | |
| OLD | NEW |