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

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

Issue 2714493002: Load DeviceLocalAccount policy and DeviceSettings immediately on restore after Chrome crash. (Closed)
Patch Set: add flag to correctly process LoadImmediately() call Created 3 years, 10 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/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 d2af391b4bf55997197ee785aa081392061c727e..a344a8d85949ed8778da47dad3fbee1db52e1245 100644
--- a/chrome/browser/chromeos/policy/device_local_account_policy_store.h
+++ b/chrome/browser/chromeos/policy/device_local_account_policy_store.h
@@ -48,6 +48,9 @@ class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
void Store(const enterprise_management::PolicyFetchResponse& policy) override;
void Load() override;
+ // Loads the policy synchronously on the current thread.
+ void LoadImmediately();
+
private:
// The callback invoked once policy validation is complete. Passed are the
// used public key and the validator.
@@ -84,6 +87,14 @@ class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
const ValidateCompletionCallback& callback,
chromeos::DeviceSettingsService::OwnershipStatus ownership_status);
+ // Creates validator for checks on policy load.
+ std::unique_ptr<UserCloudPolicyValidator> CreateValidatorForLoad(
+ bool valid_timestamp_required,
+ const enterprise_management::PolicyData* device_policy_data,
+ scoped_refptr<ownership::PublicKey> key,
+ std::unique_ptr<enterprise_management::PolicyFetchResponse>
+ policy_response);
+
const std::string account_id_;
chromeos::SessionManagerClient* session_manager_client_;
chromeos::DeviceSettingsService* device_settings_service_;

Powered by Google App Engine
This is Rietveld 408576698