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

Unified Diff: chrome/browser/chromeos/settings/session_manager_operation.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/settings/session_manager_operation.h
diff --git a/chrome/browser/chromeos/settings/session_manager_operation.h b/chrome/browser/chromeos/settings/session_manager_operation.h
index 7c558ea78735e46ccad8ce66703fd8307cfc969b..3b67b31d107b70fba69c87f2c27e4d8af379c218 100644
--- a/chrome/browser/chromeos/settings/session_manager_operation.h
+++ b/chrome/browser/chromeos/settings/session_manager_operation.h
@@ -74,6 +74,9 @@ class SessionManagerOperation {
// Starts a load operation.
void StartLoading();
+ // Synchronous load operation.
+ void LoadImmediately();
+
// Reports the result status of the operation. Once this gets called, the
// operation should not perform further processing or trigger callbacks.
void ReportResult(DeviceSettingsService::Status status);
@@ -89,6 +92,8 @@ class SessionManagerOperation {
bool force_key_load_ = false;
+ bool force_immediate_load_ = false;
+
private:
// Loads the owner key from disk. Must be run on a thread that can do I/O.
static scoped_refptr<ownership::PublicKey> LoadPublicKey(
@@ -102,6 +107,9 @@ class SessionManagerOperation {
// Triggers a device settings load.
void RetrieveDeviceSettings();
+ // Same as RetrieveDeviceSettings, but loads synchronously.
+ void BlockingRetrieveDeviceSettings();
+
// Validates device settings after retrieval from session_manager.
void ValidateDeviceSettings(const std::string& policy_blob);
@@ -131,8 +139,11 @@ class LoadSettingsOperation : public SessionManagerOperation {
public:
// Creates a new load operation. If |cloud_validations| is true, signature
// validation and other cloud-specific checks are performed.
+ // If |force_immediate_load| is true, load happens synchronously on Run()
+ // call.
LoadSettingsOperation(bool force_key_load,
bool cloud_validations,
+ bool force_immediate_load,
const Callback& callback);
~LoadSettingsOperation() override;

Powered by Google App Engine
This is Rietveld 408576698