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

Unified Diff: components/translate/core/browser/translate_prefs.cc

Issue 2816513002: Revert of Change base::Value::ListStorage to std::vector<base::Value> (Closed)
Patch Set: Created 3 years, 8 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 | « components/sync_preferences/pref_model_associator.cc ('k') | components/update_client/component_patcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/translate/core/browser/translate_prefs.cc
diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc
index 63d758b0aa7b2f54b7063ed5fb4c2a702674ec41..6e8f7b6ccfd92f8a9c02dc5a2644a333783ab710 100644
--- a/components/translate/core/browser/translate_prefs.cc
+++ b/components/translate/core/browser/translate_prefs.cc
@@ -616,7 +616,8 @@
const base::DictionaryValue* item = nullptr;
std::string language;
double probability = 0.0;
- if (entry.GetAsDictionary(&item) && item->GetString(kLanguage, &language) &&
+ if (entry->GetAsDictionary(&item) &&
+ item->GetString(kLanguage, &language) &&
item->GetDouble(kProbability, &probability)) {
// Normalize the the language code known and supported by
// Translate.
« no previous file with comments | « components/sync_preferences/pref_model_associator.cc ('k') | components/update_client/component_patcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698