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

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

Issue 868243004: Small clean up in PlatformKeysService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dropped 'WithResult' Created 5 years, 11 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/platform_keys/platform_keys_service.h
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.h b/chrome/browser/chromeos/platform_keys/platform_keys_service.h
index f903d4d3b45ab0e13e9cc845c3fbe27086105f00..79342d79923b738c938e70cfebee5ca880e63580 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys_service.h
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.h
@@ -85,8 +85,8 @@ class PlatformKeysService : public KeyedService {
const SignCallback& callback);
private:
- typedef base::Callback<void(scoped_ptr<base::ListValue> platform_keys)>
- GetPlatformKeysCallback;
+ using GetPlatformKeysCallback =
+ base::Callback<void(scoped_ptr<base::ListValue> platform_keys)>;
// Registers the given public key as newly generated key, which is allowed to
// be used for signing for a single time. Afterwards, calls |callback|. If
@@ -94,7 +94,7 @@ class PlatformKeysService : public KeyedService {
// callback.
void RegisterPublicKey(const std::string& extension_id,
const std::string& public_key_spki_der,
- const base::Callback<void(bool)>& callback);
+ const base::Closure& callback);
// Gets the current validity of the given public key by reading StateStore.
// Invalidates the key if it was found to be valid. Finally, calls |callback|
@@ -109,6 +109,11 @@ class PlatformKeysService : public KeyedService {
void GetPlatformKeysOfExtension(const std::string& extension_id,
const GetPlatformKeysCallback& callback);
+ // Writes |platform_keys| to the state store of the extension with id
+ // |extension_id|.
+ void SetPlatformKeysOfExtension(const std::string& extension_id,
+ scoped_ptr<base::ListValue> platform_keys);
+
// Callback used by |GenerateRSAKey|.
// If the key generation was successful, registers the generated public key
// for the given extension. If any error occurs during key generation or
@@ -125,7 +130,7 @@ class PlatformKeysService : public KeyedService {
void RegisterPublicKeyGotPlatformKeys(
const std::string& extension_id,
const std::string& public_key_spki_der,
- const base::Callback<void(bool)>& callback,
+ const base::Closure& callback,
scoped_ptr<base::ListValue> platform_keys);
// Callback used by |ReadValidityAndInvalidateKey|.
« no previous file with comments | « no previous file | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698