Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: chrome/browser/dom_ui/options/certificate_manager_handler.cc

Issue 5509001: DOMUI Cert manager: fix personal cert export error dialog not appearing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 dom_ui_->CallJavascriptFunction(L"CertificateRestoreOverlay.dismiss"); 526 dom_ui_->CallJavascriptFunction(L"CertificateRestoreOverlay.dismiss");
527 ImportExportCleanup(); 527 ImportExportCleanup();
528 return; 528 return;
529 } 529 }
530 std::string output; 530 std::string output;
531 int num_exported = certificate_manager_model_->cert_db().ExportToPKCS12( 531 int num_exported = certificate_manager_model_->cert_db().ExportToPKCS12(
532 selected_cert_list_, 532 selected_cert_list_,
533 password_, 533 password_,
534 &output); 534 &output);
535 if (!num_exported) { 535 if (!num_exported) {
536 dom_ui_->CallJavascriptFunction(L"CertificateRestoreOverlay.dismiss");
536 ShowError( 537 ShowError(
537 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_PKCS12_EXPORT_ERROR_TITLE), 538 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_PKCS12_EXPORT_ERROR_TITLE),
538 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_UNKNOWN_ERROR)); 539 l10n_util::GetStringUTF8(IDS_CERT_MANAGER_UNKNOWN_ERROR));
539 dom_ui_->CallJavascriptFunction(L"CertificateRestoreOverlay.dismiss");
540 ImportExportCleanup(); 540 ImportExportCleanup();
541 return; 541 return;
542 } 542 }
543 file_access_provider_->StartWrite( 543 file_access_provider_->StartWrite(
544 file_path_, 544 file_path_,
545 output, 545 output,
546 &consumer_, 546 &consumer_,
547 NewCallback(this, &CertificateManagerHandler::ExportPersonalFileWritten)); 547 NewCallback(this, &CertificateManagerHandler::ExportPersonalFileWritten));
548 } 548 }
549 549
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 StringValue error_value(error); 893 StringValue error_value(error);
894 dom_ui_->CallJavascriptFunction(L"CertificateImportErrorOverlay.show", 894 dom_ui_->CallJavascriptFunction(L"CertificateImportErrorOverlay.show",
895 title_value, 895 title_value,
896 error_value, 896 error_value,
897 cert_error_list); 897 cert_error_list);
898 } 898 }
899 899
900 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 900 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
901 return dom_ui_->tab_contents()->view()->GetTopLevelNativeWindow(); 901 return dom_ui_->tab_contents()->view()->GetTopLevelNativeWindow();
902 } 902 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698