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 | 10 |
(...skipping 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 args); | 1188 args); |
1189 } | 1189 } |
1190 } | 1190 } |
1191 | 1191 |
1192 void CertificateManagerHandler::ShowError(const std::string& title, | 1192 void CertificateManagerHandler::ShowError(const std::string& title, |
1193 const std::string& error) const { | 1193 const std::string& error) const { |
1194 auto title_value = base::MakeUnique<base::Value>(title); | 1194 auto title_value = base::MakeUnique<base::Value>(title); |
1195 auto error_value = base::MakeUnique<base::Value>(error); | 1195 auto error_value = base::MakeUnique<base::Value>(error); |
1196 auto ok_title_value = | 1196 auto ok_title_value = |
1197 base::MakeUnique<base::Value>(l10n_util::GetStringUTF8(IDS_OK)); | 1197 base::MakeUnique<base::Value>(l10n_util::GetStringUTF8(IDS_OK)); |
1198 auto cancel_title_value = base::Value::CreateNullValue(); | 1198 auto cancel_title_value = base::MakeUnique<base::Value>(); |
1199 auto ok_callback_value = base::Value::CreateNullValue(); | 1199 auto ok_callback_value = base::MakeUnique<base::Value>(); |
1200 auto cancel_callback_value = base::Value::CreateNullValue(); | 1200 auto cancel_callback_value = base::MakeUnique<base::Value>(); |
1201 std::vector<const base::Value*> args = { | 1201 std::vector<const base::Value*> args = { |
1202 title_value.get(), error_value.get(), | 1202 title_value.get(), error_value.get(), |
1203 ok_title_value.get(), cancel_title_value.get(), | 1203 ok_title_value.get(), cancel_title_value.get(), |
1204 ok_callback_value.get(), cancel_callback_value.get()}; | 1204 ok_callback_value.get(), cancel_callback_value.get()}; |
1205 web_ui()->CallJavascriptFunctionUnsafe("AlertOverlay.show", args); | 1205 web_ui()->CallJavascriptFunctionUnsafe("AlertOverlay.show", args); |
1206 } | 1206 } |
1207 | 1207 |
1208 void CertificateManagerHandler::ShowImportErrors( | 1208 void CertificateManagerHandler::ShowImportErrors( |
1209 const std::string& title, | 1209 const std::string& title, |
1210 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const { | 1210 const net::NSSCertDatabase::ImportCertFailureList& not_imported) const { |
(...skipping 20 matching lines...) Expand all Loading... |
1231 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show", | 1231 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show", |
1232 title_value, error_value, | 1232 title_value, error_value, |
1233 cert_error_list); | 1233 cert_error_list); |
1234 } | 1234 } |
1235 | 1235 |
1236 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 1236 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
1237 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); | 1237 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); |
1238 } | 1238 } |
1239 | 1239 |
1240 } // namespace options | 1240 } // namespace options |
OLD | NEW |