Chromium Code Reviews| 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 e0806584f8d147a26e221a6346b147078b143cfe..ea97e1aa4e30520cb15f7460812a61ef98529f77 100644 |
| --- a/chrome/browser/chromeos/settings/device_settings_service.h |
| +++ b/chrome/browser/chromeos/settings/device_settings_service.h |
| @@ -111,7 +111,7 @@ class DeviceSettingsService : public SessionManagerClient::Observer { |
| // the InstallAttributes class. |
| void SetDeviceMode(policy::DeviceMode device_mode); |
| - const enterprise_management::PolicyData* policy_data() { |
| + const enterprise_management::PolicyData* policy_data() const { |
| return policy_data_.get(); |
| } |
| @@ -125,8 +125,12 @@ class DeviceSettingsService : public SessionManagerClient::Observer { |
| // Returns the currently used owner key. |
| scoped_refptr<ownership::PublicKey> GetPublicKey(); |
| - // Returns the status generated by the last operation. |
| - Status status() { return store_status_; } |
| + // Returns the status generated by the *last operation*. |
|
emaxx
2017/06/01 20:13:31
nit: What about also renaming this method so that
Thiemo Nagel
2017/06/02 11:25:39
I might do that in a follow-up CL. Ideally, the o
|
| + // WARNING: It is not correct to take this method as an indication of whether |
| + // DeviceSettingsService contains valid device settings. In order to answer |
| + // that question, simply check whether device_settings() is different from |
| + // nullptr. |
| + Status status() const { return store_status_; } |
| // Triggers an attempt to pull the public half of the owner key from disk and |
| // load the device settings. |