OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/options/certificate_manager_handler.h" | 5 #include "chrome/browser/dom_ui/options/certificate_manager_handler.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/l10n_util_collator.h" | 8 #include "app/l10n_util_collator.h" |
9 #include "base/file_util.h" // for FileAccessProvider | 9 #include "base/file_util.h" // for FileAccessProvider |
10 #include "base/safe_strerror_posix.h" | 10 #include "base/safe_strerror_posix.h" |
(...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 | 772 |
773 // TODO(mattm): check here if root_cert is not a CA cert and show error. | 773 // TODO(mattm): check here if root_cert is not a CA cert and show error. |
774 | 774 |
775 StringValue cert_name(root_cert->subject().GetDisplayName()); | 775 StringValue cert_name(root_cert->subject().GetDisplayName()); |
776 dom_ui_->CallJavascriptFunction(L"CertificateEditCaTrustOverlay.showImport", | 776 dom_ui_->CallJavascriptFunction(L"CertificateEditCaTrustOverlay.showImport", |
777 cert_name); | 777 cert_name); |
778 } | 778 } |
779 | 779 |
780 void CertificateManagerHandler::ImportCATrustSelected(const ListValue* args) { | 780 void CertificateManagerHandler::ImportCATrustSelected(const ListValue* args) { |
781 bool fail = false; | 781 bool fail = false; |
782 bool trust_ssl; | 782 bool trust_ssl = false; |
783 bool trust_email; | 783 bool trust_email = false; |
784 bool trust_obj_sign; | 784 bool trust_obj_sign = false; |
785 fail |= !CallbackArgsToBool(args, 0, &trust_ssl); | 785 fail |= !CallbackArgsToBool(args, 0, &trust_ssl); |
786 fail |= !CallbackArgsToBool(args, 1, &trust_email); | 786 fail |= !CallbackArgsToBool(args, 1, &trust_email); |
787 fail |= !CallbackArgsToBool(args, 2, &trust_obj_sign); | 787 fail |= !CallbackArgsToBool(args, 2, &trust_obj_sign); |
788 if (fail) { | 788 if (fail) { |
789 LOG(ERROR) << "ImportCATrustSelected args fail"; | 789 LOG(ERROR) << "ImportCATrustSelected args fail"; |
790 ImportExportCleanup(); | 790 ImportExportCleanup(); |
791 dom_ui_->CallJavascriptFunction(L"CertificateEditCaTrustOverlay.dismiss"); | 791 dom_ui_->CallJavascriptFunction(L"CertificateEditCaTrustOverlay.dismiss"); |
792 return; | 792 return; |
793 } | 793 } |
794 | 794 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 StringValue error_value(error); | 929 StringValue error_value(error); |
930 dom_ui_->CallJavascriptFunction(L"CertificateImportErrorOverlay.show", | 930 dom_ui_->CallJavascriptFunction(L"CertificateImportErrorOverlay.show", |
931 title_value, | 931 title_value, |
932 error_value, | 932 error_value, |
933 cert_error_list); | 933 cert_error_list); |
934 } | 934 } |
935 | 935 |
936 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 936 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
937 return dom_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); | 937 return dom_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); |
938 } | 938 } |
OLD | NEW |