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

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

Issue 2920833002: Improve DeviceSettingsService documentation (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698