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

Unified Diff: chromeos/printing/printer_translator.cc

Issue 2613683004: Completely rewrite the PpdProvider/PpdCache to use the SCS backend. Along the way, clean it up a l… (Closed)
Patch Set: Plumb through rest of changes, address skau comments. Created 3 years, 11 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 38150d035c06c518a36655478065382cbc4e7026..e0856de0ec26259edbfd49b9ee29f8aa48bd3c96 100644
--- a/chromeos/printing/printer_translator.cc
+++ b/chromeos/printing/printer_translator.cc
@@ -21,8 +21,7 @@ namespace {
// PPD reference fields
const char kUserSuppliedPpdUrl[] = "user_supplied_ppd_url";
-const char kEffectiveManufacturer[] = "effective_manufacturer";
-const char kEffectiveModel[] = "effective_model";
+const char kEffectiveMakeAndModel[] = "effective_make_and_model";
skau 2017/01/27 01:37:01 Leave the constants alone for now. The Policy pro
Carlson 2017/01/27 18:48:43 Not sure how that migration will work, but ok.
// printer fields
const char kDisplayName[] = "display_name";
@@ -40,8 +39,7 @@ Printer::PpdReference DictionaryToPpdReference(
const base::DictionaryValue* value) {
Printer::PpdReference ppd;
value->GetString(kUserSuppliedPpdUrl, &ppd.user_supplied_ppd_url);
- value->GetString(kEffectiveManufacturer, &ppd.effective_manufacturer);
- value->GetString(kEffectiveModel, &ppd.effective_model);
+ value->GetString(kEffectiveMakeAndModel, &ppd.effective_make_and_model);
return ppd;
}
@@ -52,11 +50,8 @@ std::unique_ptr<base::DictionaryValue> PpdReferenceToDictionary(
if (!ppd.user_supplied_ppd_url.empty()) {
dictionary->SetString(kUserSuppliedPpdUrl, ppd.user_supplied_ppd_url);
}
- if (!ppd.effective_manufacturer.empty()) {
- dictionary->SetString(kEffectiveManufacturer, ppd.effective_manufacturer);
- }
- if (!ppd.effective_model.empty()) {
- dictionary->SetString(kEffectiveModel, ppd.effective_model);
+ if (!ppd.effective_make_and_model.empty()) {
+ dictionary->SetString(kEffectiveMakeAndModel, ppd.effective_make_and_model);
}
return dictionary;
}

Powered by Google App Engine
This is Rietveld 408576698