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_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ | 5 #ifndef RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ |
6 #define RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ | 6 #define RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
| 11 #include <memory> |
| 12 |
11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
12 #include "base/macros.h" | 14 #include "base/macros.h" |
13 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
14 #include "base/values.h" | 16 #include "base/values.h" |
15 #include "rlz/lib/rlz_value_store.h" | 17 #include "rlz/lib/rlz_value_store.h" |
16 | 18 |
17 namespace base { | 19 namespace base { |
18 class ListValue; | 20 class ListValue; |
19 class SequencedTaskRunner; | 21 class SequencedTaskRunner; |
20 class Value; | 22 class Value; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // Writes RLZ store back to file. | 69 // Writes RLZ store back to file. |
68 void WriteStore(); | 70 void WriteStore(); |
69 | 71 |
70 // Adds |value| to list at |list_name| path in JSON store. | 72 // Adds |value| to list at |list_name| path in JSON store. |
71 bool AddValueToList(const std::string& list_name, base::Value* value); | 73 bool AddValueToList(const std::string& list_name, base::Value* value); |
72 // Removes |value| from list at |list_name| path in JSON store. | 74 // Removes |value| from list at |list_name| path in JSON store. |
73 bool RemoveValueFromList(const std::string& list_name, | 75 bool RemoveValueFromList(const std::string& list_name, |
74 const base::Value& value); | 76 const base::Value& value); |
75 | 77 |
76 // In-memory store with RLZ data. | 78 // In-memory store with RLZ data. |
77 scoped_ptr<base::DictionaryValue> rlz_store_; | 79 std::unique_ptr<base::DictionaryValue> rlz_store_; |
78 | 80 |
79 base::FilePath store_path_; | 81 base::FilePath store_path_; |
80 | 82 |
81 bool read_only_; | 83 bool read_only_; |
82 | 84 |
83 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreChromeOS); | 85 DISALLOW_COPY_AND_ASSIGN(RlzValueStoreChromeOS); |
84 }; | 86 }; |
85 | 87 |
86 } // namespace rlz_lib | 88 } // namespace rlz_lib |
87 | 89 |
88 #endif // RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ | 90 #endif // RLZ_CHROMEOS_LIB_RLZ_VALUE_STORE_CHROMEOS_H_ |
OLD | NEW |