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

Side by Side Diff: chrome/browser/ui/webui/options/certificate_manager_handler.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months 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
OLDNEW
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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 base::Unretained(this))); 729 base::Unretained(this)));
730 } 730 }
731 731
732 void CertificateManagerHandler::ImportPersonalSlotUnlocked() { 732 void CertificateManagerHandler::ImportPersonalSlotUnlocked() {
733 // Determine if the private key should be unextractable after the import. 733 // Determine if the private key should be unextractable after the import.
734 // We do this by checking the value of |use_hardware_backed_| which is set 734 // We do this by checking the value of |use_hardware_backed_| which is set
735 // to true if importing into a hardware module. Currently, this only happens 735 // to true if importing into a hardware module. Currently, this only happens
736 // for Chrome OS when the "Import and Bind" option is chosen. 736 // for Chrome OS when the "Import and Bind" option is chosen.
737 bool is_extractable = !use_hardware_backed_; 737 bool is_extractable = !use_hardware_backed_;
738 int result = certificate_manager_model_->ImportFromPKCS12( 738 int result = certificate_manager_model_->ImportFromPKCS12(
739 module_, file_data_, password_, is_extractable); 739 module_.get(), file_data_, password_, is_extractable);
740 ImportExportCleanup(); 740 ImportExportCleanup();
741 web_ui()->CallJavascriptFunction("CertificateRestoreOverlay.dismiss"); 741 web_ui()->CallJavascriptFunction("CertificateRestoreOverlay.dismiss");
742 int string_id; 742 int string_id;
743 switch (result) { 743 switch (result) {
744 case net::OK: 744 case net::OK:
745 return; 745 return;
746 case net::ERR_PKCS12_IMPORT_BAD_PASSWORD: 746 case net::ERR_PKCS12_IMPORT_BAD_PASSWORD:
747 // TODO(mattm): if the error was a bad password, we should reshow the 747 // TODO(mattm): if the error was a bad password, we should reshow the
748 // password dialog after the user dismisses the error dialog. 748 // password dialog after the user dismisses the error dialog.
749 string_id = IDS_CERT_MANAGER_BAD_PASSWORD; 749 string_id = IDS_CERT_MANAGER_BAD_PASSWORD;
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1082 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady", 1082 web_ui()->CallJavascriptFunction("CertificateManager.onCheckTpmTokenReady",
1083 ready); 1083 ready);
1084 } 1084 }
1085 #endif 1085 #endif
1086 1086
1087 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1087 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1088 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(); 1088 return web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow();
1089 } 1089 }
1090 1090
1091 } // namespace options 1091 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/ntp/thumbnail_source.cc ('k') | chrome/browser/ui/webui/options/import_data_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698