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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args); | 1109 web_ui()->CallJavascriptFunction("CertificateManager.onPopulateTree", args); |
1110 } | 1110 } |
1111 } | 1111 } |
1112 | 1112 |
1113 void CertificateManagerHandler::ShowError(const std::string& title, | 1113 void CertificateManagerHandler::ShowError(const std::string& title, |
1114 const std::string& error) const { | 1114 const std::string& error) const { |
1115 ScopedVector<const base::Value> args; | 1115 ScopedVector<const base::Value> args; |
1116 args.push_back(new base::StringValue(title)); | 1116 args.push_back(new base::StringValue(title)); |
1117 args.push_back(new base::StringValue(error)); | 1117 args.push_back(new base::StringValue(error)); |
1118 args.push_back(new base::StringValue(l10n_util::GetStringUTF8(IDS_OK))); | 1118 args.push_back(new base::StringValue(l10n_util::GetStringUTF8(IDS_OK))); |
1119 args.push_back(base::Value::CreateNullValue()); // cancelTitle | 1119 args.push_back(base::Value::CreateNullValue().release()); // cancelTitle |
1120 args.push_back(base::Value::CreateNullValue()); // okCallback | 1120 args.push_back(base::Value::CreateNullValue().release()); // okCallback |
1121 args.push_back(base::Value::CreateNullValue()); // cancelCallback | 1121 args.push_back(base::Value::CreateNullValue().release()); // cancelCallback |
1122 web_ui()->CallJavascriptFunction("AlertOverlay.show", args.get()); | 1122 web_ui()->CallJavascriptFunction("AlertOverlay.show", args.get()); |
1123 } | 1123 } |
1124 | 1124 |
1125 void CertificateManagerHandler::ShowImportErrors( | 1125 void CertificateManagerHandler::ShowImportErrors( |
1126 const std::string& title, | 1126 const std::string& title, |
1127 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const { | 1127 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const { |
1128 std::string error; | 1128 std::string error; |
1129 if (selected_cert_list_.size() == 1) | 1129 if (selected_cert_list_.size() == 1) |
1130 error = l10n_util::GetStringUTF8( | 1130 error = l10n_util::GetStringUTF8( |
1131 IDS_CERT_MANAGER_IMPORT_SINGLE_NOT_IMPORTED); | 1131 IDS_CERT_MANAGER_IMPORT_SINGLE_NOT_IMPORTED); |
(...skipping 17 matching lines...) Expand all Loading... |
1149 title_value, | 1149 title_value, |
1150 error_value, | 1150 error_value, |
1151 cert_error_list); | 1151 cert_error_list); |
1152 } | 1152 } |
1153 | 1153 |
1154 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1154 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1155 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); | 1155 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); |
1156 } | 1156 } |
1157 | 1157 |
1158 } // namespace options | 1158 } // namespace options |
OLD | NEW |