OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_CACHE_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_CACHE_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <string> |
| 10 |
| 11 #include "base/basictypes.h" |
| 12 #include "base/values.h" |
| 13 #include "chrome/browser/policy/proto/chrome_device_policy.pb.h" |
| 14 #include "chrome/browser/policy/proto/device_management_backend.pb.h" |
| 15 |
| 16 namespace em = enterprise_management; |
| 17 |
| 18 class PrefService; |
| 19 |
| 20 namespace chromeos { |
| 21 |
| 22 // There is need (metrics at OOBE stage) to store settings |
| 23 // (that normally would go into SignedSettings storage) |
| 24 // before owner has been assigned (hence no key is available). |
| 25 // This set of functions serves as a transient storage in that case. |
| 26 namespace signed_settings_cache { |
| 27 // Registers required pref section. |
| 28 void RegisterPrefs(PrefService* local_state); |
| 29 |
| 30 // Stores a new policy blob inside the cache stored in |local_state|. |
| 31 bool Store(const em::PolicyData &policy, PrefService* local_state); |
| 32 |
| 33 // Retrieves the policy blob from the cache stored in |local_state|. |
| 34 bool Retrieve(em::PolicyData *policy, PrefService* local_state); |
| 35 |
| 36 // Call this after owner has been assigned to persist settings |
| 37 // into SignedSettings storage. |
| 38 void Finalize(PrefService* local_state); |
| 39 } // namespace signed_settings_cache |
| 40 |
| 41 } // namespace chromeos |
| 42 |
| 43 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_CACHE_H_ |
OLD | NEW |