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

Unified Diff: chrome/browser/chromeos/policy/device_local_account_policy_store.h

Issue 2488573003: Expose signing key from cloud policy stores (Closed)
Patch Set: Rebase Created 4 years, 1 month 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/policy/device_local_account_policy_store.h
diff --git a/chrome/browser/chromeos/policy/device_local_account_policy_store.h b/chrome/browser/chromeos/policy/device_local_account_policy_store.h
index 63c81ecc959735dbf40778884ecd42d901573cc7..fd0d923bca582cb45be7e3c799cc942776603439 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_store.h
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_store.h
@@ -8,6 +8,7 @@
#include <memory>
#include <string>
+#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
@@ -21,7 +22,6 @@ class SequencedTaskRunner;
}
namespace chromeos {
-class DeviceSettingsService;
class SessionManagerClient;
}
@@ -35,8 +35,7 @@ class DeviceLocalAccountPolicyBroker;
// CloudPolicyStore implementation for device-local account policy. Stores/loads
// policy to/from session_manager.
-class DeviceLocalAccountPolicyStore
- : public UserCloudPolicyStoreBase {
+class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
public:
DeviceLocalAccountPolicyStore(
const std::string& account_id,
@@ -52,15 +51,23 @@ class DeviceLocalAccountPolicyStore
void Load() override;
private:
+ // The callback invoked once policy validation is complete. Passed are the
+ // used public key and the validator.
+ using ValidateCompletionCallback =
+ base::Callback<void(const std::string&, UserCloudPolicyValidator*)>;
+
// Called back by |session_manager_client_| after policy retrieval. Checks for
// success and triggers policy validation.
void ValidateLoadedPolicyBlob(const std::string& policy_blob);
// Updates state after validation and notifies observers.
- void UpdatePolicy(UserCloudPolicyValidator* validator);
+ void UpdatePolicy(const std::string& signature_validation_public_key,
+ UserCloudPolicyValidator* validator);
// Sends the policy blob to session_manager for storing after validation.
- void StoreValidatedPolicy(UserCloudPolicyValidator* validator);
+ void StoreValidatedPolicy(
+ const std::string& signature_validation_public_key_unused,
+ UserCloudPolicyValidator* validator);
// Called back when a store operation completes, updates state and reloads the
// policy if applicable.
@@ -70,13 +77,13 @@ class DeviceLocalAccountPolicyStore
void CheckKeyAndValidate(
bool valid_timestamp_required,
std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
- const UserCloudPolicyValidator::CompletionCallback& callback);
+ const ValidateCompletionCallback& callback);
// Triggers policy validation.
void Validate(
bool valid_timestamp_required,
std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
- const UserCloudPolicyValidator::CompletionCallback& callback,
+ const ValidateCompletionCallback& callback,
chromeos::DeviceSettingsService::OwnershipStatus ownership_status);
const std::string account_id_;

Powered by Google App Engine
This is Rietveld 408576698