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

Side by Side Diff: chrome/browser/ui/crypto_module_password_dialog_nss.cc

Issue 2724013002: net: remove CryptoModule class (Closed)
Patch Set: Created 3 years, 9 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) 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/crypto_module_password_dialog_nss.h" 5 #include "chrome/browser/ui/crypto_module_password_dialog_nss.h"
6 6
7 #include <pk11pub.h> 7 #include <pk11pub.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
13 #include "net/base/crypto_module.h"
14 #include "net/cert/x509_certificate.h" 13 #include "net/cert/x509_certificate.h"
15 14
16 using content::BrowserThread; 15 using content::BrowserThread;
17 16
18 namespace { 17 namespace {
19 18
20 bool ShouldShowDialog(PK11SlotInfo* slot) { 19 bool ShouldShowDialog(PK11SlotInfo* slot) {
21 // The wincx arg is unused since we don't call PK11_SetIsLoggedInFunc. 20 // The wincx arg is unused since we don't call PK11_SetIsLoggedInFunc.
22 return (PK11_NeedLogin(slot) && !PK11_IsLoggedIn(slot, NULL /* wincx */)); 21 return (PK11_NeedLogin(slot) && !PK11_IsLoggedIn(slot, NULL /* wincx */));
23 } 22 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 const net::HostPortPair& server, 139 const net::HostPortPair& server,
141 gfx::NativeWindow parent, 140 gfx::NativeWindow parent,
142 const base::Closure& callback) { 141 const base::Closure& callback) {
143 std::vector<crypto::ScopedPK11Slot> modules; 142 std::vector<crypto::ScopedPK11Slot> modules;
144 modules.push_back( 143 modules.push_back(
145 crypto::ScopedPK11Slot(PK11_ReferenceSlot(cert->os_cert_handle()->slot))); 144 crypto::ScopedPK11Slot(PK11_ReferenceSlot(cert->os_cert_handle()->slot)));
146 UnlockSlotsIfNecessary(std::move(modules), reason, server, parent, callback); 145 UnlockSlotsIfNecessary(std::move(modules), reason, server, parent, callback);
147 } 146 }
148 147
149 } // namespace chrome 148 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ui/webui/options/certificate_manager_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698