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

Side by Side Diff: chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h

Issue 2094333002: Implementation for chrome.certificateProvider.requestPin/stopPinRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fixed Created 4 years, 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_ API_H_
7 7
8 #include "extensions/browser/extension_function.h" 8 #include "extensions/browser/extension_function.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 27 matching lines...) Expand all
38 class CertificateProviderInternalReportSignatureFunction 38 class CertificateProviderInternalReportSignatureFunction
39 : public UIThreadExtensionFunction { 39 : public UIThreadExtensionFunction {
40 private: 40 private:
41 ~CertificateProviderInternalReportSignatureFunction() override; 41 ~CertificateProviderInternalReportSignatureFunction() override;
42 ResponseAction Run() override; 42 ResponseAction Run() override;
43 43
44 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportSignature", 44 DECLARE_EXTENSION_FUNCTION("certificateProviderInternal.reportSignature",
45 CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE); 45 CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE);
46 }; 46 };
47 47
48 // The maximum number of times per minute, extension is allowed to show PIN
49 // dialog again after user closed the previous one.
50 extern const int MAX_CLOSED_DIALOGS_PER_10_MINUTES;
stevenjb 2016/08/11 01:58:55 Does this need to be exposed publicly?
igorcov1 2016/08/11 16:15:23 It's used in tests.
51
52 class CertificateProviderRequestPinFunction
53 : public UIThreadExtensionFunction {
54 private:
55 ~CertificateProviderRequestPinFunction() override;
56 ResponseAction Run() override;
57 bool ShouldSkipQuotaLimiting() const override;
58 void GetQuotaLimitHeuristics(
59 extensions::QuotaLimitHeuristics* heuristics) const override;
60 void OnInputReceived(const base::string16& value);
61
62 DECLARE_EXTENSION_FUNCTION("certificateProvider.requestPin",
63 CERTIFICATEPROVIDER_REQUESTPIN);
64 };
65
66 class CertificateProviderStopPinRequestFunction
67 : public UIThreadExtensionFunction {
68 private:
69 ~CertificateProviderStopPinRequestFunction() override;
70 ResponseAction Run() override;
71 void DialogClosed(const base::string16& value);
72
73 DECLARE_EXTENSION_FUNCTION("certificateProvider.stopPinRequest",
74 CERTIFICATEPROVIDER_STOPPINREQUEST);
75 };
76
48 } // namespace extensions 77 } // namespace extensions
49 78
50 #endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVID ER_API_H_ 79 #endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVID ER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698