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

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: wrap Validator in unique_ptr 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..b8945f8ace7335b6f0f4786220a842555831b3c6 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.
@@ -56,7 +59,8 @@ class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
// Called back by |session_manager_client_| after policy retrieval. Checks for
// success and triggers policy validation.
- void ValidateLoadedPolicyBlob(const std::string& policy_blob);
+ void ValidateLoadedPolicyBlob(bool validate_in_background,
+ const std::string& policy_blob);
// Updates state after validation and notifies observers.
void UpdatePolicy(const std::string& signature_validation_public_key,
@@ -75,6 +79,7 @@ class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
void CheckKeyAndValidate(
bool valid_timestamp_required,
std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
+ bool validate_in_background,
const ValidateCompletionCallback& callback);
// Triggers policy validation.
@@ -82,6 +87,7 @@ class DeviceLocalAccountPolicyStore : public UserCloudPolicyStoreBase {
bool valid_timestamp_required,
std::unique_ptr<enterprise_management::PolicyFetchResponse> policy,
const ValidateCompletionCallback& callback,
+ bool validate_in_background,
chromeos::DeviceSettingsService::OwnershipStatus ownership_status);
const std::string account_id_;

Powered by Google App Engine
This is Rietveld 408576698