OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/options/certificate_manager_handler.h" | 5 #include "chrome/browser/ui/webui/options/certificate_manager_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 #include <algorithm> | 10 #include <algorithm> |
(...skipping 1163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1174 subnodes->Append(cert_dict); | 1174 subnodes->Append(cert_dict); |
1175 } | 1175 } |
1176 std::sort(subnodes->begin(), subnodes->end(), comparator); | 1176 std::sort(subnodes->begin(), subnodes->end(), comparator); |
1177 | 1177 |
1178 dict->Set(kSubNodesId, subnodes); | 1178 dict->Set(kSubNodesId, subnodes); |
1179 nodes->Append(dict); | 1179 nodes->Append(dict); |
1180 } | 1180 } |
1181 std::sort(nodes->begin(), nodes->end(), comparator); | 1181 std::sort(nodes->begin(), nodes->end(), comparator); |
1182 | 1182 |
1183 base::ListValue args; | 1183 base::ListValue args; |
1184 args.Append(new base::StringValue(tree_name)); | 1184 args.AppendString(tree_name); |
1185 args.Append(nodes); | 1185 args.Append(nodes); |
1186 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args); | 1186 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args); |
1187 } | 1187 } |
1188 } | 1188 } |
1189 | 1189 |
1190 void CertificateManagerHandler::ShowError(const std::string& title, | 1190 void CertificateManagerHandler::ShowError(const std::string& title, |
1191 const std::string& error) const { | 1191 const std::string& error) const { |
1192 ScopedVector<const base::Value> args; | 1192 ScopedVector<const base::Value> args; |
1193 args.push_back(new base::StringValue(title)); | 1193 args.push_back(new base::StringValue(title)); |
1194 args.push_back(new base::StringValue(error)); | 1194 args.push_back(new base::StringValue(error)); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1226 title_value, | 1226 title_value, |
1227 error_value, | 1227 error_value, |
1228 cert_error_list); | 1228 cert_error_list); |
1229 } | 1229 } |
1230 | 1230 |
1231 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1231 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1232 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); | 1232 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); |
1233 } | 1233 } |
1234 | 1234 |
1235 } // namespace options | 1235 } // namespace options |
OLD | NEW |