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

Side by Side Diff: crypto/nss_crypto_module_delegate.h

Issue 2677583002: Fix non-noise cpplint errors in //crypto. (Closed)
Patch Set: fix p224_unittest.cc 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
« no previous file with comments | « crypto/mock_apple_keychain.h ('k') | crypto/nss_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ 5 #ifndef CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_
6 #define CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ 6 #define CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 17 matching lines...) Expand all
28 void* wincx() { return this; } 28 void* wincx() { return this; }
29 29
30 // Requests a password to unlock |slot_name|. The interface is synchronous 30 // Requests a password to unlock |slot_name|. The interface is synchronous
31 // because NSS cannot issue an asynchronous request. |retry| is true if this 31 // because NSS cannot issue an asynchronous request. |retry| is true if this
32 // is a request for the retry and we previously returned the wrong password. 32 // is a request for the retry and we previously returned the wrong password.
33 // The implementation should set |*cancelled| to true if the user cancelled 33 // The implementation should set |*cancelled| to true if the user cancelled
34 // instead of entering a password, otherwise it should return the password the 34 // instead of entering a password, otherwise it should return the password the
35 // user entered. 35 // user entered.
36 virtual std::string RequestPassword(const std::string& slot_name, bool retry, 36 virtual std::string RequestPassword(const std::string& slot_name, bool retry,
37 bool* cancelled) = 0; 37 bool* cancelled) = 0;
38
39 }; 38 };
40 39
41 // Extends CryptoModuleBlockingPasswordDelegate with the ability to return a 40 // Extends CryptoModuleBlockingPasswordDelegate with the ability to return a
42 // slot in which to act. (Eg, which slot to store a generated key in.) 41 // slot in which to act. (Eg, which slot to store a generated key in.)
43 class NSSCryptoModuleDelegate : public CryptoModuleBlockingPasswordDelegate { 42 class NSSCryptoModuleDelegate : public CryptoModuleBlockingPasswordDelegate {
44 public: 43 public:
45 ~NSSCryptoModuleDelegate() override {} 44 ~NSSCryptoModuleDelegate() override {}
46 45
47 // Get the slot to store the generated key. 46 // Get the slot to store the generated key.
48 virtual ScopedPK11Slot RequestSlot() = 0; 47 virtual ScopedPK11Slot RequestSlot() = 0;
49 }; 48 };
50 49
51 } // namespace crypto 50 } // namespace crypto
52 51
53 #endif // CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_ 52 #endif // CRYPTO_NSS_CRYPTO_MODULE_DELEGATE_H_
OLDNEW
« no previous file with comments | « crypto/mock_apple_keychain.h ('k') | crypto/nss_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698