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

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

Issue 2021393004: Migrate WaitableEvent to enum-based constructor in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: Split out custom changes to thread_watcher_unittest.cc Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_delegate_nss.h" 5 #include "chrome/browser/ui/crypto_module_delegate_nss.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/net/nss_context.h" 10 #include "chrome/browser/net/nss_context.h"
(...skipping 18 matching lines...) Expand all
29 } 29 }
30 30
31 } // namespace 31 } // namespace
32 32
33 ChromeNSSCryptoModuleDelegate::ChromeNSSCryptoModuleDelegate( 33 ChromeNSSCryptoModuleDelegate::ChromeNSSCryptoModuleDelegate(
34 chrome::CryptoModulePasswordReason reason, 34 chrome::CryptoModulePasswordReason reason,
35 const net::HostPortPair& server, 35 const net::HostPortPair& server,
36 crypto::ScopedPK11Slot slot) 36 crypto::ScopedPK11Slot slot)
37 : reason_(reason), 37 : reason_(reason),
38 server_(server), 38 server_(server),
39 event_(false, false), 39 event_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
40 base::WaitableEvent::InitialState::NOT_SIGNALED),
40 cancelled_(false), 41 cancelled_(false),
41 slot_(std::move(slot)) {} 42 slot_(std::move(slot)) {}
42 43
43 ChromeNSSCryptoModuleDelegate::~ChromeNSSCryptoModuleDelegate() {} 44 ChromeNSSCryptoModuleDelegate::~ChromeNSSCryptoModuleDelegate() {}
44 45
45 // static 46 // static
46 void ChromeNSSCryptoModuleDelegate::CreateForResourceContext( 47 void ChromeNSSCryptoModuleDelegate::CreateForResourceContext(
47 chrome::CryptoModulePasswordReason reason, 48 chrome::CryptoModulePasswordReason reason,
48 const net::HostPortPair& server, 49 const net::HostPortPair& server,
49 content::ResourceContext* context, 50 content::ResourceContext* context,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 crypto::CryptoModuleBlockingPasswordDelegate* 115 crypto::CryptoModuleBlockingPasswordDelegate*
115 CreateCryptoModuleBlockingPasswordDelegate( 116 CreateCryptoModuleBlockingPasswordDelegate(
116 chrome::CryptoModulePasswordReason reason, 117 chrome::CryptoModulePasswordReason reason,
117 const net::HostPortPair& server) { 118 const net::HostPortPair& server) {
118 // Returns a ChromeNSSCryptoModuleDelegate without Pk11Slot. Since it is only 119 // Returns a ChromeNSSCryptoModuleDelegate without Pk11Slot. Since it is only
119 // being used as a CryptoModuleBlockingDialogDelegate, using a slot handle is 120 // being used as a CryptoModuleBlockingDialogDelegate, using a slot handle is
120 // unnecessary. 121 // unnecessary.
121 return new ChromeNSSCryptoModuleDelegate( 122 return new ChromeNSSCryptoModuleDelegate(
122 reason, server, crypto::ScopedPK11Slot()); 123 reason, server, crypto::ScopedPK11Slot());
123 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698