| Index: chromeos/printing/ppd_provider.cc
|
| diff --git a/chromeos/printing/ppd_provider.cc b/chromeos/printing/ppd_provider.cc
|
| index 37130fc02b61a536952ace5bc62ef4ae09f9b6a5..a6a08c59ec79ca9a5e0938bc4afe1337b072139b 100644
|
| --- a/chromeos/printing/ppd_provider.cc
|
| +++ b/chromeos/printing/ppd_provider.cc
|
| @@ -431,11 +431,11 @@
|
| // This should just be a simple list of locale strings.
|
| std::vector<std::string> available_locales;
|
| bool found_en = false;
|
| - for (const base::Value& entry : *top_list) {
|
| + for (const std::unique_ptr<base::Value>& entry : *top_list) {
|
| std::string tmp;
|
| // Locales should have at *least* a two-character country code. 100 is an
|
| // arbitrary upper bound for length to protect against extreme bogosity.
|
| - if (!entry.GetAsString(&tmp) || tmp.size() < 2 || tmp.size() > 100) {
|
| + if (!entry->GetAsString(&tmp) || tmp.size() < 2 || tmp.size() > 100) {
|
| FailQueuedMetadataResolutions(PpdProvider::INTERNAL_ERROR);
|
| return;
|
| }
|
| @@ -603,10 +603,10 @@
|
| result = PpdProvider::NOT_FOUND;
|
| for (const auto& entry : *top_list) {
|
| int device_id;
|
| - const base::ListValue* sub_list;
|
| + base::ListValue* sub_list;
|
|
|
| // Each entry should be a size-2 list with an integer and a string.
|
| - if (!entry.GetAsList(&sub_list) || sub_list->GetSize() != 2 ||
|
| + if (!entry->GetAsList(&sub_list) || sub_list->GetSize() != 2 ||
|
| !sub_list->GetInteger(0, &device_id) ||
|
| !sub_list->GetString(1, &contents) || device_id < 0 ||
|
| device_id > 0xffff) {
|
| @@ -791,9 +791,9 @@
|
| return PpdProvider::INTERNAL_ERROR;
|
| }
|
| for (const auto& entry : *top_list) {
|
| - const base::ListValue* sub_list;
|
| + base::ListValue* sub_list;
|
| contents->push_back({});
|
| - if (!entry.GetAsList(&sub_list) || sub_list->GetSize() != 2 ||
|
| + if (!entry->GetAsList(&sub_list) || sub_list->GetSize() != 2 ||
|
| !sub_list->GetString(0, &contents->back().first) ||
|
| !sub_list->GetString(1, &contents->back().second)) {
|
| contents->clear();
|
|
|