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

Unified Diff: chrome/common/cloud_print/cloud_print_cdd_conversion.cc

Issue 334763002: Add paper size reporting for CUPS printers (to let user to select one in the Print Preview). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add unit test for PPD page size extraction, log error on PPD file opening, address other cl comment… Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | printing/backend/cups_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/cloud_print/cloud_print_cdd_conversion.cc
diff --git a/chrome/common/cloud_print/cloud_print_cdd_conversion.cc b/chrome/common/cloud_print/cloud_print_cdd_conversion.cc
index b485cffbd76bd465a79d417c14b9c7ffd840d0a1..70c774d9fdfd3fc1a507f59cc6b1d22398af652e 100644
--- a/chrome/common/cloud_print/cloud_print_cdd_conversion.cc
+++ b/chrome/common/cloud_print/cloud_print_cdd_conversion.cc
@@ -55,8 +55,8 @@ scoped_ptr<base::DictionaryValue> PrinterSemanticCapsAndDefaultsToCdd(
color.SaveTo(&description);
if (!semantic_info.papers.empty()) {
- Media default_media(semantic_info.default_paper.name,
- "",
+ Media default_media(semantic_info.default_paper.display_name,
+ semantic_info.default_paper.vendor_id,
semantic_info.default_paper.size_um.width(),
semantic_info.default_paper.size_um.height());
default_media.MatchBySize();
@@ -67,8 +67,8 @@ scoped_ptr<base::DictionaryValue> PrinterSemanticCapsAndDefaultsToCdd(
gfx::Size paper_size = semantic_info.papers[i].size_um;
if (paper_size.width() > paper_size.height())
paper_size.SetSize(paper_size.height(), paper_size.width());
- Media new_media(semantic_info.papers[i].name,
- "",
+ Media new_media(semantic_info.papers[i].display_name,
+ semantic_info.papers[i].vendor_id,
paper_size.width(),
paper_size.height());
new_media.MatchBySize();
« no previous file with comments | « chrome/common/chrome_utility_messages.h ('k') | printing/backend/cups_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698