OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
128 | 128 |
129 // Perform fixups required to ensure sensical local-owner device policy: | 129 // Perform fixups required to ensure sensical local-owner device policy: |
130 // 1) user whitelisting must be explicitly allowed or disallowed, and | 130 // 1) user whitelisting must be explicitly allowed or disallowed, and |
131 // 2) the owner user must be on the whitelist, if it's enforced. | 131 // 2) the owner user must be on the whitelist, if it's enforced. |
132 static void FixupLocalOwnerPolicy( | 132 static void FixupLocalOwnerPolicy( |
133 const std::string& user_id, | 133 const std::string& user_id, |
134 enterprise_management::ChromeDeviceSettingsProto* settings); | 134 enterprise_management::ChromeDeviceSettingsProto* settings); |
135 | 135 |
136 // OwnerSettingsService protected interface overrides: | 136 // OwnerSettingsService protected interface overrides: |
137 | 137 |
138 // Reloads private key from profile's NSS slots, responds via |callback|. | 138 // Reloads private key from profile's NSS slots, responds via |callback|. On |
139 // success, |private_key| is non-null, but if the private key doesn't exist, | |
140 // |private_key->key()| may be null. | |
davidben
2015/05/06 18:48:39
This is really weird and, tbh, I don't think it ma
Dmitry Polukhin
2015/05/07 10:59:16
NULL private key means that active user is not an
davidben
2015/05/07 20:51:44
Right. But the question is whether this is signale
| |
139 void ReloadKeypairImpl(const base::Callback< | 141 void ReloadKeypairImpl(const base::Callback< |
140 void(const scoped_refptr<ownership::PublicKey>& public_key, | 142 void(const scoped_refptr<ownership::PublicKey>& public_key, |
141 const scoped_refptr<ownership::PrivateKey>& private_key)>& callback) | 143 const scoped_refptr<ownership::PrivateKey>& private_key)>& callback) |
142 override; | 144 override; |
143 | 145 |
144 // Possibly notifies DeviceSettingsService that owner's keypair is loaded. | 146 // Possibly notifies DeviceSettingsService that owner's keypair is loaded. |
145 void OnPostKeypairLoadedActions() override; | 147 void OnPostKeypairLoadedActions() override; |
146 | 148 |
147 // Tries to apply recent changes to device settings proto, sign it and store. | 149 // Tries to apply recent changes to device settings proto, sign it and store. |
148 void StorePendingChanges(); | 150 void StorePendingChanges(); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 base::WeakPtrFactory<OwnerSettingsServiceChromeOS> weak_factory_; | 202 base::WeakPtrFactory<OwnerSettingsServiceChromeOS> weak_factory_; |
201 | 203 |
202 base::WeakPtrFactory<OwnerSettingsServiceChromeOS> store_settings_factory_; | 204 base::WeakPtrFactory<OwnerSettingsServiceChromeOS> store_settings_factory_; |
203 | 205 |
204 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOS); | 206 DISALLOW_COPY_AND_ASSIGN(OwnerSettingsServiceChromeOS); |
205 }; | 207 }; |
206 | 208 |
207 } // namespace chromeos | 209 } // namespace chromeos |
208 | 210 |
209 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ | 211 #endif // CHROME_BROWSER_CHROMEOS_OWNERSHIP_OWNER_SETTINGS_SERVICE_CHROMEOS_H_ |
OLD | NEW |