Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_util.h" // for FileAccessProvider | 7 #include "base/file_util.h" // for FileAccessProvider |
| 8 #include "base/safe_strerror_posix.h" | 8 #include "base/safe_strerror_posix.h" |
| 9 #include "base/scoped_vector.h" | 9 #include "base/scoped_vector.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 674 void CertificateManagerHandler::CancelImportExportProcess( | 674 void CertificateManagerHandler::CancelImportExportProcess( |
| 675 const ListValue* args) { | 675 const ListValue* args) { |
| 676 ImportExportCleanup(); | 676 ImportExportCleanup(); |
| 677 } | 677 } |
| 678 | 678 |
| 679 void CertificateManagerHandler::ImportExportCleanup() { | 679 void CertificateManagerHandler::ImportExportCleanup() { |
| 680 file_path_.clear(); | 680 file_path_.clear(); |
| 681 password_.clear(); | 681 password_.clear(); |
| 682 file_data_.clear(); | 682 file_data_.clear(); |
| 683 selected_cert_list_.clear(); | 683 selected_cert_list_.clear(); |
| 684 // There may be pending file dialogs, we need to tell them that we've gone | |
|
brettw
2011/03/26 18:12:10
It's harder for me to follow this with a comment i
| |
| 685 // away so they don't try and call back to us. | |
| 686 if (select_file_dialog_.get()) | |
| 687 select_file_dialog_->ListenerDestroyed(); | |
| 684 select_file_dialog_ = NULL; | 688 select_file_dialog_ = NULL; |
| 685 module_ = NULL; | 689 module_ = NULL; |
| 686 } | 690 } |
| 687 | 691 |
| 688 void CertificateManagerHandler::ImportServer(const ListValue* args) { | 692 void CertificateManagerHandler::ImportServer(const ListValue* args) { |
| 689 select_file_dialog_ = SelectFileDialog::Create(this); | 693 select_file_dialog_ = SelectFileDialog::Create(this); |
| 690 ShowCertSelectFileDialog( | 694 ShowCertSelectFileDialog( |
| 691 select_file_dialog_.get(), | 695 select_file_dialog_.get(), |
| 692 SelectFileDialog::SELECT_OPEN_FILE, | 696 SelectFileDialog::SELECT_OPEN_FILE, |
| 693 FilePath(), | 697 FilePath(), |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 940 StringValue error_value(error); | 944 StringValue error_value(error); |
| 941 web_ui_->CallJavascriptFunction("CertificateImportErrorOverlay.show", | 945 web_ui_->CallJavascriptFunction("CertificateImportErrorOverlay.show", |
| 942 title_value, | 946 title_value, |
| 943 error_value, | 947 error_value, |
| 944 cert_error_list); | 948 cert_error_list); |
| 945 } | 949 } |
| 946 | 950 |
| 947 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { | 951 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { |
| 948 return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); | 952 return web_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); |
| 949 } | 953 } |
| OLD | NEW |