| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium OS 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 CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ | 5 #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ |
| 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ | 6 #define CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace chromeos_update_engine { | 10 namespace chromeos_update_engine { |
| 11 | 11 |
| 12 extern const char kPrefsDeltaUpdateFailures[]; | 12 extern const char kPrefsDeltaUpdateFailures[]; |
| 13 extern const char kPrefsLastActivePingDay[]; | 13 extern const char kPrefsLastActivePingDay[]; |
| 14 extern const char kPrefsLastRollCallPingDay[]; | 14 extern const char kPrefsLastRollCallPingDay[]; |
| 15 extern const char kPrefsManifestMetadataSize[]; | 15 extern const char kPrefsManifestMetadataSize[]; |
| 16 extern const char kPrefsUpdateCheckResponseHash[]; | 16 extern const char kPrefsUpdateCheckResponseHash[]; |
| 17 extern const char kPrefsUpdateStateNextDataOffset[]; | 17 extern const char kPrefsUpdateStateNextDataOffset[]; |
| 18 extern const char kPrefsUpdateStateNextOperation[]; | 18 extern const char kPrefsUpdateStateNextOperation[]; |
| 19 extern const char kPrefsUpdateStateSHA256Context[]; |
| 19 extern const char kPrefsUpdateStateSignedSHA256Context[]; | 20 extern const char kPrefsUpdateStateSignedSHA256Context[]; |
| 20 | 21 |
| 21 // The prefs interface allows access to a persistent preferences | 22 // The prefs interface allows access to a persistent preferences |
| 22 // store. The two reasons for providing this as an interface are | 23 // store. The two reasons for providing this as an interface are |
| 23 // testing as well as easier switching to a new implementation in the | 24 // testing as well as easier switching to a new implementation in the |
| 24 // future, if necessary. | 25 // future, if necessary. |
| 25 | 26 |
| 26 class PrefsInterface { | 27 class PrefsInterface { |
| 27 public: | 28 public: |
| 28 // Gets a string |value| associated with |key|. Returns true on | 29 // Gets a string |value| associated with |key|. Returns true on |
| (...skipping 13 matching lines...) Expand all Loading... |
| 42 // Associates |key| with an int64 |value|. Returns true on success, | 43 // Associates |key| with an int64 |value|. Returns true on success, |
| 43 // false otherwise. | 44 // false otherwise. |
| 44 virtual bool SetInt64(const std::string& key, const int64_t value) = 0; | 45 virtual bool SetInt64(const std::string& key, const int64_t value) = 0; |
| 45 | 46 |
| 46 virtual ~PrefsInterface() {} | 47 virtual ~PrefsInterface() {} |
| 47 }; | 48 }; |
| 48 | 49 |
| 49 } // namespace chromeos_update_engine | 50 } // namespace chromeos_update_engine |
| 50 | 51 |
| 51 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ | 52 #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_INTERFACE_H__ |
| OLD | NEW |