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

Unified Diff: chromeos/printing/printer_translator.cc

Issue 2956173002: Introduce the field make_and_model for synced printers. (Closed)
Patch Set: address comments. Add test Created 3 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
Index: chromeos/printing/printer_translator.cc
diff --git a/chromeos/printing/printer_translator.cc b/chromeos/printing/printer_translator.cc
index c723664611528dc0ea0ec28c5914574844072c16..fa4010a5682553552cba1df7e2966814a004a3ef 100644
--- a/chromeos/printing/printer_translator.cc
+++ b/chromeos/printing/printer_translator.cc
@@ -65,6 +65,12 @@ bool DictionaryToPrinter(const DictionaryValue& value, Printer* printer) {
if (value.GetString(kModel, &model))
printer->set_model(model);
+ std::string make_and_model = manufacturer;
+ if (!make_and_model.empty() && !model.empty())
+ make_and_model.append(" ");
+ make_and_model.append(model);
+ printer->set_make_and_model(make_and_model);
+
std::string uuid;
if (value.GetString(kUUID, &uuid))
printer->set_uuid(uuid);

Powered by Google App Engine
This is Rietveld 408576698