OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef BASE_CRYPTO_PK11_BLOCKING_PASSWORD_DELEGATE_H_ | |
6 #define BASE_CRYPTO_PK11_BLOCKING_PASSWORD_DELEGATE_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 | |
11 namespace base { | |
12 | |
13 // PK11_SetPasswordFunc is a global setting. An implementation of | |
14 // PK11BlockingPasswordDelegate should be passed as the user data argument | |
15 // (|wincx|) to relevant NSS functions, which the global password handler will | |
16 // call to do the actual work. | |
17 class PK11BlockingPasswordDelegate { | |
18 public: | |
19 virtual ~PK11BlockingPasswordDelegate() {} | |
20 | |
21 // Requests a password to unlock |slot|. The interface is | |
wtc
2010/12/15 20:54:36
Typo: |slot| => |slot_name|
|retry| is PR_TR
mattm
2011/01/12 01:22:07
Done.
| |
22 // synchronous because NSS cannot issue an asynchronous | |
23 // request. |retry| is PR_TRUE if this is a request for the retry | |
24 // and we previously returned the wrong password. | |
25 // Caller should set |cancelled| to true if the user cancelled instead of | |
wtc
2010/12/15 20:54:36
I think "Caller" should be changed to "An implemen
mattm
2011/01/12 01:22:07
Done.
| |
26 // entering a password. | |
27 virtual std::string RequestPassword(const std::string& slot_name, bool retry, | |
28 bool* cancelled) = 0; | |
29 }; | |
30 | |
31 } | |
32 | |
33 #endif // BASE_CRYPTO_PK11_BLOCKING_PASSWORD_DELEGATE_H_ | |
OLD | NEW |