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

Unified 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: Fixed review comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
diff --git a/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h b/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
index bc4ec19752bd8f6605fc8805833953e044b7da47..5ee456e3b69c241c55a6b9222731528fa9db0dc3 100644
--- a/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
+++ b/chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h
@@ -17,6 +17,10 @@ namespace extensions {
namespace api {
namespace certificate_provider {
+// The maximum number of times per minute, extension is allowed to show PIN
Devlin 2016/11/01 16:24:30 Is this the maximum number of times per minute, or
igorcov 2016/11/04 15:51:42 Per 10 minutes, sorry.
+// dialog again after user closed the previous one.
+extern const int kMaxClosedDialogsPer10Mins;
+
struct CertificateInfo;
}
}
@@ -45,6 +49,30 @@ class CertificateProviderInternalReportSignatureFunction
CERTIFICATEPROVIDERINTERNAL_REPORTSIGNATURE);
};
+class CertificateProviderRequestPinFunction : public UIThreadExtensionFunction {
+ private:
+ ~CertificateProviderRequestPinFunction() override;
+ ResponseAction Run() override;
+ bool ShouldSkipQuotaLimiting() const override;
+ void GetQuotaLimitHeuristics(
+ extensions::QuotaLimitHeuristics* heuristics) const override;
+ void OnInputReceived(const base::string16& value);
+
+ DECLARE_EXTENSION_FUNCTION("certificateProvider.requestPin",
+ CERTIFICATEPROVIDER_REQUESTPIN);
+};
+
+class CertificateProviderStopPinRequestFunction
+ : public UIThreadExtensionFunction {
+ private:
+ ~CertificateProviderStopPinRequestFunction() override;
+ ResponseAction Run() override;
+ void DialogClosed(const base::string16& value);
+
+ DECLARE_EXTENSION_FUNCTION("certificateProvider.stopPinRequest",
+ CERTIFICATEPROVIDER_STOPPINREQUEST);
+};
+
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_API_H_

Powered by Google App Engine
This is Rietveld 408576698