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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.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/device_settings_service.h
diff --git a/chrome/browser/chromeos/settings/device_settings_service.h b/chrome/browser/chromeos/settings/device_settings_service.h
index 8a7e68bbc93136a21cb4c0cfdacfa695b54e113f..a4fd37997f3c73c7a5634a8900c062435af00771 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.h
+++ b/chrome/browser/chromeos/settings/device_settings_service.h
@@ -132,6 +132,9 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
// load the device settings.
void Load();
+ // Synchronously pulls the public key and loads the device settings.
+ void LoadImmediately();
+
// Stores a policy blob to session_manager. The result of the operation is
// reported through |callback|. If successful, the updated device settings are
// present in policy_data() and device_settings() when the callback runs.
@@ -237,6 +240,10 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
// currently active; it gets removed and destroyed once it completes.
std::deque<linked_ptr<SessionManagerOperation>> pending_operations_;
+ // Flags whether current load operation was started synchronously, not from
+ // queue of pending operations.
+ bool loading_immediately_ = false;
+
base::ObserverList<Observer> observers_;
// For recoverable load errors how many retries are left before we give up.

Powered by Google App Engine
This is Rietveld 408576698