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

Unified Diff: chrome/browser/chromeos/printing/specifics_translation.h

Issue 2884863002: Add an autoconf field to printer objects. (Closed)
Patch Set: grammar Created 3 years, 7 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 | chrome/browser/chromeos/printing/specifics_translation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/printing/specifics_translation.h
diff --git a/chrome/browser/chromeos/printing/specifics_translation.h b/chrome/browser/chromeos/printing/specifics_translation.h
index 382f766c3c7fec1253f1decdc23d154eacfa158a..386b944b5bdad9e145a4a85a861c9f5d00ae67ca 100644
--- a/chrome/browser/chromeos/printing/specifics_translation.h
+++ b/chrome/browser/chromeos/printing/specifics_translation.h
@@ -13,13 +13,21 @@
namespace chromeos {
namespace printing {
+// Convert |printer| into its local representation. Enforces that only one
+// field in PpdReference is filled in. In order of preference, we populate
+// autoconf, user_supplied_ppd_url, or effective_make_and_model.
std::unique_ptr<Printer> SpecificsToPrinter(
const sync_pb::PrinterSpecifics& printer);
+// Convert |printer| into its proto representation.
std::unique_ptr<sync_pb::PrinterSpecifics> PrinterToSpecifics(
const Printer& printer);
-// Merge fields from |printer| into |specifics|.
+// Merge fields from |printer| into |specifics|. Merge strategy is to only
+// write non-default fields from |printer| into the appropriate field in
+// |specifics|. Default fields are skipped to prevent accidentally clearing
+// |specifics|. Enforces field exclusivity in PpdReference as described in
+// SpecificsToPrinter.
void MergePrinterToSpecifics(const Printer& printer,
sync_pb::PrinterSpecifics* specifics);
« no previous file with comments | « no previous file | chrome/browser/chromeos/printing/specifics_translation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698