Index: chrome/browser/ui/webui/settings/certificates_handler.cc |
diff --git a/chrome/browser/ui/webui/settings/certificates_handler.cc b/chrome/browser/ui/webui/settings/certificates_handler.cc |
index 53119399ac8958829645715a5c000652337e53b0..f909bb4ec549f8c2d99ab52b0a4b48b506b1df56 100644 |
--- a/chrome/browser/ui/webui/settings/certificates_handler.cc |
+++ b/chrome/browser/ui/webui/settings/certificates_handler.cc |
@@ -88,13 +88,16 @@ struct DictionaryIdComparator { |
explicit DictionaryIdComparator(icu::Collator* collator) |
: collator_(collator) {} |
- bool operator()(const base::Value* a, const base::Value* b) const { |
+ bool operator()(const std::unique_ptr<base::Value>& a, |
+ const std::unique_ptr<base::Value>& b) const { |
DCHECK(a->GetType() == base::Value::TYPE_DICTIONARY); |
DCHECK(b->GetType() == base::Value::TYPE_DICTIONARY); |
- const base::DictionaryValue* a_dict = |
- reinterpret_cast<const base::DictionaryValue*>(a); |
- const base::DictionaryValue* b_dict = |
- reinterpret_cast<const base::DictionaryValue*>(b); |
+ const base::DictionaryValue* a_dict; |
+ if (!a->GetAsDictionary(&a_dict)) |
+ NOTREACHED(); |
danakj
2016/05/24 20:08:34
nitto
dcheng
2016/05/24 20:39:02
Done.
|
+ const base::DictionaryValue* b_dict; |
+ if (!b->GetAsDictionary(&b_dict)) |
+ NOTREACHED(); |
base::string16 a_str; |
base::string16 b_str; |
a_dict->GetString(kNameField, &a_str); |