OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef RLZ_WIN_LIB_RLZ_VALUE_STORE_REGISTRY_H_ |
| 6 #define RLZ_WIN_LIB_RLZ_VALUE_STORE_REGISTRY_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "rlz/lib/rlz_value_store.h" |
| 10 |
| 11 namespace rlz_lib { |
| 12 |
| 13 // Implements RlzValueStore by storing values in the windows registry. |
| 14 class RlzValueStoreRegistry : public RlzValueStore { |
| 15 public: |
| 16 static std::wstring GetWideLibKeyName(); |
| 17 |
| 18 virtual bool HasAccess(AccessType type) OVERRIDE; |
| 19 |
| 20 virtual bool WritePingTime(Product product, int64 time) OVERRIDE; |
| 21 virtual bool ReadPingTime(Product product, int64* time) OVERRIDE; |
| 22 virtual bool ClearPingTime(Product product) OVERRIDE; |
| 23 |
| 24 virtual bool WriteAccessPointRlz(AccessPoint access_point, |
| 25 const char* new_rlz) OVERRIDE; |
| 26 virtual bool ReadAccessPointRlz(AccessPoint access_point, |
| 27 char* rlz, |
| 28 size_t rlz_size) OVERRIDE; |
| 29 virtual bool ClearAccessPointRlz(AccessPoint access_point) OVERRIDE; |
| 30 |
| 31 virtual bool AddProductEvent(Product product, const char* event_rlz) OVERRIDE; |
| 32 virtual bool ReadProductEvents(Product product, |
| 33 std::vector<std::string>* events) OVERRIDE; |
| 34 virtual bool ClearProductEvent(Product product, |
| 35 const char* event_rlz) OVERRIDE; |
| 36 virtual bool ClearAllProductEvents(Product product) OVERRIDE; |
| 37 |
| 38 virtual bool AddStatefulEvent(Product product, |
| 39 const char* event_rlz) OVERRIDE; |
| 40 virtual bool IsStatefulEvent(Product product, |
| 41 const char* event_rlz) OVERRIDE; |
| 42 virtual bool ClearAllStatefulEvents(Product product) OVERRIDE; |
| 43 |
| 44 virtual void CollectGarbage() OVERRIDE; |
| 45 |
| 46 private: |
| 47 RlzValueStoreRegistry() {} |
| 48 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreRegistry); |
| 49 friend class ScopedRlzValueStoreLock; |
| 50 }; |
| 51 |
| 52 } // namespace rlz_lib |
| 53 |
| 54 #endif // RLZ_WIN_LIB_RLZ_VALUE_STORE_REGISTRY_H_ |
| 55 |
OLD | NEW |