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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_service.h

Issue 10885015: Implement new-style CloudPolicyStore for Chrome OS device policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase, fix compilation. Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/settings/device_settings_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SETTINGS_DEVICE_SETTINGS_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_SERVICE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 template <typename T> struct DefaultLazyInstanceTraits; 21 template <typename T> struct DefaultLazyInstanceTraits;
22 } 22 }
23 23
24 namespace crypto { 24 namespace crypto {
25 class RSAPrivateKey; 25 class RSAPrivateKey;
26 } 26 }
27 27
28 namespace enterprise_management { 28 namespace enterprise_management {
29 class ChromeDeviceSettingsProto; 29 class ChromeDeviceSettingsProto;
30 class PolicyData; 30 class PolicyData;
31 class PolicyFetchResponse;
31 } 32 }
32 33
33 namespace chromeos { 34 namespace chromeos {
34 35
35 class OwnerKeyUtil; 36 class OwnerKeyUtil;
36 class SessionManagerOperation; 37 class SessionManagerOperation;
37 38
38 // Keeps the public and private halves of the owner key. Both may be missing, 39 // Keeps the public and private halves of the owner key. Both may be missing,
39 // but if the private key is present, the public half will be as well. This 40 // but if the private key is present, the public half will be as well. This
40 // class is immutable and refcounted in order to allow safe access from any 41 // class is immutable and refcounted in order to allow safe access from any
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // operation is reported through |callback|. If successful, the updated device 152 // operation is reported through |callback|. If successful, the updated device
152 // settings are present in policy_data() and device_settings() when the 153 // settings are present in policy_data() and device_settings() when the
153 // callback runs. 154 // callback runs.
154 void SignAndStore( 155 void SignAndStore(
155 scoped_ptr<enterprise_management::ChromeDeviceSettingsProto> new_settings, 156 scoped_ptr<enterprise_management::ChromeDeviceSettingsProto> new_settings,
156 const base::Closure& callback); 157 const base::Closure& callback);
157 158
158 // Stores a policy blob to session_manager. The result of the operation is 159 // Stores a policy blob to session_manager. The result of the operation is
159 // reported through |callback|. If successful, the updated device settings are 160 // reported through |callback|. If successful, the updated device settings are
160 // present in policy_data() and device_settings() when the callback runs. 161 // present in policy_data() and device_settings() when the callback runs.
161 void Store(const std::string& policy_blob, const base::Closure& callback); 162 void Store(scoped_ptr<enterprise_management::PolicyFetchResponse> policy,
163 const base::Closure& callback);
162 164
163 // Returns the ownership status. May return OWNERSHIP_UNKNOWN if the disk 165 // Returns the ownership status. May return OWNERSHIP_UNKNOWN if the disk
164 // hasn't been checked yet. 166 // hasn't been checked yet.
165 OwnershipStatus GetOwnershipStatus(); 167 OwnershipStatus GetOwnershipStatus();
166 168
167 // Determines the ownership status and reports the result to |callback|. This 169 // Determines the ownership status and reports the result to |callback|. This
168 // is guaranteed to never return OWNERSHIP_UNKNOWN. 170 // is guaranteed to never return OWNERSHIP_UNKNOWN.
169 void GetOwnershipStatusAsync(const OwnershipStatusCallback& callback); 171 void GetOwnershipStatusAsync(const OwnershipStatusCallback& callback);
170 172
171 // Checks whether we have the private owner key. 173 // Checks whether we have the private owner key.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 std::deque<SessionManagerOperation*> pending_operations_; 228 std::deque<SessionManagerOperation*> pending_operations_;
227 229
228 ObserverList<Observer, true> observers_; 230 ObserverList<Observer, true> observers_;
229 231
230 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsService); 232 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsService);
231 }; 233 };
232 234
233 } // namespace chromeos 235 } // namespace chromeos
234 236
235 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_SERVICE_H_ 237 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_SERVICE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/settings/device_settings_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698