OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/webui/settings/certificates_handler.h" | 5 #include "chrome/browser/ui/webui/settings/certificates_handler.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 std::string OrgNameToId(const std::string& org) { | 82 std::string OrgNameToId(const std::string& org) { |
83 return "org-" + org; | 83 return "org-" + org; |
84 } | 84 } |
85 | 85 |
86 struct DictionaryIdComparator { | 86 struct DictionaryIdComparator { |
87 explicit DictionaryIdComparator(icu::Collator* collator) | 87 explicit DictionaryIdComparator(icu::Collator* collator) |
88 : collator_(collator) {} | 88 : collator_(collator) {} |
89 | 89 |
90 bool operator()(const std::unique_ptr<base::Value>& a, | 90 bool operator()(const std::unique_ptr<base::Value>& a, |
91 const std::unique_ptr<base::Value>& b) const { | 91 const std::unique_ptr<base::Value>& b) const { |
92 DCHECK(a->GetType() == base::Value::TYPE_DICTIONARY); | 92 DCHECK(a->GetType() == base::Value::Type::DICTIONARY); |
93 DCHECK(b->GetType() == base::Value::TYPE_DICTIONARY); | 93 DCHECK(b->GetType() == base::Value::Type::DICTIONARY); |
94 const base::DictionaryValue* a_dict; | 94 const base::DictionaryValue* a_dict; |
95 bool a_is_dictionary = a->GetAsDictionary(&a_dict); | 95 bool a_is_dictionary = a->GetAsDictionary(&a_dict); |
96 DCHECK(a_is_dictionary); | 96 DCHECK(a_is_dictionary); |
97 const base::DictionaryValue* b_dict; | 97 const base::DictionaryValue* b_dict; |
98 bool b_is_dictionary = b->GetAsDictionary(&b_dict); | 98 bool b_is_dictionary = b->GetAsDictionary(&b_dict); |
99 DCHECK(b_is_dictionary); | 99 DCHECK(b_is_dictionary); |
100 base::string16 a_str; | 100 base::string16 a_str; |
101 base::string16 b_str; | 101 base::string16 b_str; |
102 a_dict->GetString(kNameField, &a_str); | 102 a_dict->GetString(kNameField, &a_str); |
103 b_dict->GetString(kNameField, &b_str); | 103 b_dict->GetString(kNameField, &b_str); |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1140 error_info->Set(kCertificateErrors, | 1140 error_info->Set(kCertificateErrors, |
1141 base::WrapUnique(cert_error_list.release())); | 1141 base::WrapUnique(cert_error_list.release())); |
1142 RejectCallback(*error_info); | 1142 RejectCallback(*error_info); |
1143 } | 1143 } |
1144 | 1144 |
1145 gfx::NativeWindow CertificatesHandler::GetParentWindow() const { | 1145 gfx::NativeWindow CertificatesHandler::GetParentWindow() const { |
1146 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); | 1146 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); |
1147 } | 1147 } |
1148 | 1148 |
1149 } // namespace settings | 1149 } // namespace settings |
OLD | NEW |