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

Unified Diff: chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h

Issue 985093002: Fix up Owner settings on first load (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: based off mattias' patch that injects CrosSettings for testing Created 5 years, 9 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/ownership/owner_settings_service_chromeos.h
diff --git a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
index f1394b4d42dea08ada001c382d492b1448e27faf..b6ae936c41fe8009ac4476627a2c3f427f2f0b3f 100644
--- a/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
+++ b/chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h
@@ -34,6 +34,7 @@ class OwnerKeyUtil;
namespace chromeos {
+class CrosSettings;
class FakeOwnerSettingsService;
// The class is a profile-keyed service which holds public/private
@@ -121,6 +122,7 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
protected:
OwnerSettingsServiceChromeOS(
DeviceSettingsService* device_settings_service,
+ CrosSettings* cros_settings,
Profile* profile,
const scoped_refptr<ownership::OwnerKeyUtil>& owner_key_util);
@@ -138,6 +140,10 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
// Possibly notifies DeviceSettingsService that owner's keypair is loaded.
void OnPostKeypairLoadedActions() override;
+ // Once trusted settings are loaded, ensures that the Owner's user_id_ is
+ // on the user account whitelist.
+ void FixupLocalOwnerPolicy();
+
// Tries to apply recent changes to device settings proto, sign it and store.
void StorePendingChanges();
@@ -156,6 +162,8 @@ class OwnerSettingsServiceChromeOS : public ownership::OwnerSettingsService,
DeviceSettingsService* device_settings_service_;
+ CrosSettings* cros_settings_;
+
// Profile this service instance belongs to.
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698