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

Unified Diff: printing/backend/cups_helper.cc

Issue 578493003: Take PPD and CUPS defaults into account on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/backend/cups_helper.cc
diff --git a/printing/backend/cups_helper.cc b/printing/backend/cups_helper.cc
index 80019f090193adbf867e62d599912a81db7f15fb..c0271b2a2872f46b9eeb74b73f9b555a6a86aa89 100644
--- a/printing/backend/cups_helper.cc
+++ b/printing/backend/cups_helper.cc
@@ -38,7 +38,6 @@ const char kPageSize[] = "PageSize";
const double kMicronsPerPoint = 10.0f * kHundrethsMMPerInch / kPointsPerInch;
-#if !defined(OS_MACOSX)
void ParseLpOptions(const base::FilePath& filepath,
const std::string& printer_name,
int* num_options, cups_option_t** options) {
@@ -98,7 +97,6 @@ void ParseLpOptions(const base::FilePath& filepath,
void MarkLpOptions(const std::string& printer_name, ppd_file_t** ppd) {
cups_option_t* options = NULL;
int num_options = 0;
- ppdMarkDefaults(*ppd);
const char kSystemLpOptionPath[] = "/etc/cups/lpoptions";
const char kUserLpOptionPath[] = ".cups/lpoptions";
@@ -120,7 +118,6 @@ void MarkLpOptions(const std::string& printer_name, ppd_file_t** ppd) {
}
}
}
-#endif // !defined(OS_MACOSX)
bool GetBasicColorModelSettings(ppd_file_t* ppd,
ColorModel* color_model_for_black,
@@ -369,11 +366,10 @@ bool ParsePpdCapabilities(
<< line << ", " << ppdErrorString(ppd_status);
return false;
}
+ ppdMarkDefaults(ppd);
+ MarkLpOptions(printer_name, &ppd);
printing::PrinterSemanticCapsAndDefaults caps;
-#if !defined(OS_MACOSX)
- MarkLpOptions(printer_name, &ppd);
-#endif
caps.collate_capable = true;
caps.collate_default = true;
caps.copies_capable = true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698