| 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_TEMP_STORAGE_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_TEMP_STORAGE_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include <string> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 #include "base/values.h" | |
| 13 | |
| 14 class PrefService; | |
| 15 | |
| 16 namespace chromeos { | |
| 17 | |
| 18 // There is need (proxy settings at OOBE stage) to store settings | |
| 19 // (that are normally go into SignedSettings storage) | |
| 20 // before owner has been assigned (hence no key is available). | |
| 21 // This class serves as a transient storage in that case. | |
| 22 class SignedSettingsTempStorage { | |
| 23 public: | |
| 24 // Registers required pref section. | |
| 25 static void RegisterPrefs(PrefService* local_state); | |
| 26 | |
| 27 static bool Store(const std::string& name, | |
| 28 const base::Value& value, | |
| 29 PrefService* local_state); | |
| 30 static bool Retrieve(const std::string& name, | |
| 31 base::Value** value, | |
| 32 PrefService* local_state); | |
| 33 | |
| 34 // Call this after owner has been assigned to persist settings | |
| 35 // into SignedSettings storage. | |
| 36 static void Finalize(PrefService* local_state); | |
| 37 | |
| 38 private: | |
| 39 SignedSettingsTempStorage() {} | |
| 40 DISALLOW_COPY_AND_ASSIGN(SignedSettingsTempStorage); | |
| 41 }; | |
| 42 | |
| 43 } // namespace chromeos | |
| 44 | |
| 45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNED_SETTINGS_TEMP_STORAGE_H_ | |
| OLD | NEW |