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

Unified Diff: chrome/browser/chromeos/settings/device_settings_service.h

Issue 2798343003: Merge "cros: Fix flaky owner detection" (Closed)
Patch Set: Created 3 years, 8 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 efb3d027568350eedc3d8b0e8bb4d0dc043a947f..e0806584f8d147a26e221a6346b147078b143cfe 100644
--- a/chrome/browser/chromeos/settings/device_settings_service.h
+++ b/chrome/browser/chromeos/settings/device_settings_service.h
@@ -172,6 +172,12 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
ownership::OwnerSettingsService* GetOwnerSettingsService() const;
+ // Mark that the device will establish consumer ownership. If the flag is set
+ // and ownership is not taken, policy reload will be deferred until InitOwner
+ // is called. So that the ownership status is flipped after the private part
+ // of owner is fully loaded.
+ void MarkWillEstablishConsumerOwnership();
+
// Adds an observer.
void AddObserver(Observer* observer);
// Removes an observer.
@@ -250,6 +256,9 @@ class DeviceSettingsService : public SessionManagerClient::Observer {
// For recoverable load errors how many retries are left before we give up.
int load_retries_left_;
+ // Whether the device will be establishing consumer ownership.
+ bool will_establish_consumer_ownership_ = false;
+
base::WeakPtrFactory<DeviceSettingsService> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(DeviceSettingsService);

Powered by Google App Engine
This is Rietveld 408576698