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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys.h

Issue 323093003: Add the Sign-At-Most-Once restriction the enterprise.platformKeys API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/platform_keys/platform_keys.h
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys.h b/chrome/browser/chromeos/platform_keys/platform_keys.h
index de27fb4610741ef88fdc5b0aee3f65b01ce584a9..a2b0ad631c22a1791f1c2b42068318c648be5f0e 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys.h
+++ b/chrome/browser/chromeos/platform_keys/platform_keys.h
@@ -24,10 +24,11 @@ namespace chromeos {
namespace platform_keys {
-// If the generation was successful, |public_key_spki_der| will contain the DER
-// encoding of the SubjectPublicKeyInfo of the generated key and |error_message|
-// will be empty. If it failed, |public_key_spki_der| will be empty and
-// |error_message| contain an error message.
+namespace subtle {
pneubeck (no reviews) 2014/06/10 17:50:11 I could move these functions to another file. But
+// Functions of this namespace shouldn't be called directly from the context of
+// an extension. Instead use PlatfromKeysService which enforces restrictions
eroman 2014/06/12 05:50:45 typeo Platfrom -> Platform
pneubeck (no reviews) 2014/06/12 09:21:36 Done.
+// upon extensions.
+
typedef base::Callback<void(const std::string& public_key_spki_der,
const std::string& error_message)>
GenerateKeyCallback;
@@ -40,9 +41,6 @@ void GenerateRSAKey(const std::string& token_id,
const GenerateKeyCallback& callback,
Profile* profile);
-// If signing was successful, |signature| will be contain the signature and
-// |error_message| will be empty. If it failed, |signature| will be empty and
-// |error_message| contain an error message.
typedef base::Callback<void(const std::string& signature,
const std::string& error_message)> SignCallback;
@@ -58,6 +56,8 @@ void Sign(const std::string& token_id,
const SignCallback& callback,
Profile* profile);
+} // namespace subtle
+
// If the list of certificates could be successfully retrieved, |certs| will
// contain the list of available certificates (maybe empty) and |error_message|
// will be empty. If an error occurred, |certs| will be empty and

Powered by Google App Engine
This is Rietveld 408576698