Chromium Code Reviews| 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); |
|
Carlson
2017/06/28 17:38:36
Nit: I think it's a little clearer if this line i
skau
2017/06/28 21:25:35
But that wouldn't be equivalent. If model is not
Carlson
2017/06/28 22:22:04
Indeed, I fail at logic today. Alas!
Can I sugge
skau
2017/06/28 22:41:05
Done.
|
| + printer->set_make_and_model(make_and_model); |
| + |
| std::string uuid; |
| if (value.GetString(kUUID, &uuid)) |
| printer->set_uuid(uuid); |