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

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

Issue 2711113002: net: remove CryptoModuleList typedef (Closed)
Patch Set: one more fix for chromeos Created 3 years, 10 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
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 <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 821 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 ImportExportCleanup(); 832 ImportExportCleanup();
833 return; 833 return;
834 } 834 }
835 835
836 if (use_hardware_backed_) { 836 if (use_hardware_backed_) {
837 slot_ = certificate_manager_model_->cert_db()->GetPrivateSlot(); 837 slot_ = certificate_manager_model_->cert_db()->GetPrivateSlot();
838 } else { 838 } else {
839 slot_ = certificate_manager_model_->cert_db()->GetPublicSlot(); 839 slot_ = certificate_manager_model_->cert_db()->GetPublicSlot();
840 } 840 }
841 841
842 net::CryptoModuleList modules; 842 std::vector<crypto::ScopedPK11Slot> modules;
843 modules.push_back(net::CryptoModule::CreateFromHandle(slot_.get())); 843 modules.push_back(crypto::ScopedPK11Slot(PK11_ReferenceSlot(slot_.get())));
844 chrome::UnlockSlotsIfNecessary( 844 chrome::UnlockSlotsIfNecessary(
845 modules, 845 modules,
846 chrome::kCryptoModulePasswordCertImport, 846 chrome::kCryptoModulePasswordCertImport,
847 net::HostPortPair(), // unused. 847 net::HostPortPair(), // unused.
848 GetParentWindow(), 848 GetParentWindow(),
849 base::Bind(&CertificateManagerHandler::ImportPersonalSlotUnlocked, 849 base::Bind(&CertificateManagerHandler::ImportPersonalSlotUnlocked,
850 base::Unretained(this))); 850 base::Unretained(this)));
851 } 851 }
852 852
853 void CertificateManagerHandler::ImportPersonalSlotUnlocked() { 853 void CertificateManagerHandler::ImportPersonalSlotUnlocked() {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show", 1233 web_ui()->CallJavascriptFunctionUnsafe("CertificateImportErrorOverlay.show",
1234 title_value, error_value, 1234 title_value, error_value,
1235 cert_error_list); 1235 cert_error_list);
1236 } 1236 }
1237 1237
1238 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const { 1238 gfx::NativeWindow CertificateManagerHandler::GetParentWindow() const {
1239 return web_ui()->GetWebContents()->GetTopLevelNativeWindow(); 1239 return web_ui()->GetWebContents()->GetTopLevelNativeWindow();
1240 } 1240 }
1241 1241
1242 } // namespace options 1242 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698