| OLD | NEW |
| 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 RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ | 5 #ifndef RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ |
| 6 #define RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ | 6 #define RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 8 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 9 #include "base/mac/scoped_nsobject.h" | 12 #include "base/mac/scoped_nsobject.h" |
| 13 #include "base/macros.h" |
| 10 #include "rlz/lib/rlz_value_store.h" | 14 #include "rlz/lib/rlz_value_store.h" |
| 11 | 15 |
| 12 @class NSDictionary; | 16 @class NSDictionary; |
| 13 @class NSMutableDictionary; | 17 @class NSMutableDictionary; |
| 14 | 18 |
| 15 namespace rlz_lib { | 19 namespace rlz_lib { |
| 16 | 20 |
| 17 // An implementation of RlzValueStore for mac. It stores information in a | 21 // An implementation of RlzValueStore for mac. It stores information in a |
| 18 // plist file in the user's Application Support folder. | 22 // plist file in the user's Application Support folder. |
| 19 class RlzValueStoreMac : public RlzValueStore { | 23 class RlzValueStoreMac : public RlzValueStore { |
| 20 public: | 24 public: |
| 21 bool HasAccess(AccessType type) override; | 25 bool HasAccess(AccessType type) override; |
| 22 | 26 |
| 23 bool WritePingTime(Product product, int64 time) override; | 27 bool WritePingTime(Product product, int64_t time) override; |
| 24 bool ReadPingTime(Product product, int64* time) override; | 28 bool ReadPingTime(Product product, int64_t* time) override; |
| 25 bool ClearPingTime(Product product) override; | 29 bool ClearPingTime(Product product) override; |
| 26 | 30 |
| 27 bool WriteAccessPointRlz(AccessPoint access_point, | 31 bool WriteAccessPointRlz(AccessPoint access_point, |
| 28 const char* new_rlz) override; | 32 const char* new_rlz) override; |
| 29 bool ReadAccessPointRlz(AccessPoint access_point, | 33 bool ReadAccessPointRlz(AccessPoint access_point, |
| 30 char* rlz, | 34 char* rlz, |
| 31 size_t rlz_size) override; | 35 size_t rlz_size) override; |
| 32 bool ClearAccessPointRlz(AccessPoint access_point) override; | 36 bool ClearAccessPointRlz(AccessPoint access_point) override; |
| 33 | 37 |
| 34 bool AddProductEvent(Product product, const char* event_rlz) override; | 38 bool AddProductEvent(Product product, const char* event_rlz) override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 | 72 |
| 69 base::scoped_nsobject<NSMutableDictionary> dict_; | 73 base::scoped_nsobject<NSMutableDictionary> dict_; |
| 70 base::scoped_nsobject<NSString> plist_path_; | 74 base::scoped_nsobject<NSString> plist_path_; |
| 71 | 75 |
| 72 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreMac); | 76 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreMac); |
| 73 }; | 77 }; |
| 74 | 78 |
| 75 } // namespace rlz_lib | 79 } // namespace rlz_lib |
| 76 | 80 |
| 77 #endif // RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ | 81 #endif // RLZ_MAC_LIB_RLZ_VALUE_STORE_MAC_H_ |
| OLD | NEW |