OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 NET_SDCH_SDCH_OWNER_H_ | 5 #ifndef NET_SDCH_SDCH_OWNER_H_ |
6 #define NET_SDCH_SDCH_OWNER_H_ | 6 #define NET_SDCH_SDCH_OWNER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 size_t size; | 154 size_t size; |
155 | 155 |
156 DictionaryInfo() : use_count(0), size(0) {} | 156 DictionaryInfo() : use_count(0), size(0) {} |
157 DictionaryInfo(const base::Time& last_used, size_t size) | 157 DictionaryInfo(const base::Time& last_used, size_t size) |
158 : last_used(last_used), use_count(0), size(size) {} | 158 : last_used(last_used), use_count(0), size(size) {} |
159 DictionaryInfo(const DictionaryInfo& rhs) = default; | 159 DictionaryInfo(const DictionaryInfo& rhs) = default; |
160 DictionaryInfo& operator=(const DictionaryInfo& rhs) = default; | 160 DictionaryInfo& operator=(const DictionaryInfo& rhs) = default; |
161 }; | 161 }; |
162 | 162 |
163 // base::MemoryCoordinatorClient implementation: | 163 // base::MemoryCoordinatorClient implementation: |
164 void OnMemoryStateChange(base::MemoryState state) override; | 164 void OnPurgeMemory() override; |
165 | 165 |
166 void OnMemoryPressure( | 166 void OnMemoryPressure( |
167 base::MemoryPressureListener::MemoryPressureLevel level); | 167 base::MemoryPressureListener::MemoryPressureLevel level); |
168 | 168 |
169 // Clears data to save memory usage. | 169 // Clears data to save memory usage. |
170 void ClearData(); | 170 void ClearData(); |
171 | 171 |
172 // Schedule loading of all dictionaries described in |persisted_info|. | 172 // Schedule loading of all dictionaries described in |persisted_info|. |
173 // Returns false and does not schedule a load if |persisted_info| has an | 173 // Returns false and does not schedule a load if |persisted_info| has an |
174 // unsupported version or no dictionaries key. Skips any dictionaries that are | 174 // unsupported version or no dictionaries key. Skips any dictionaries that are |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // Creation time for this SdchOwner object, used for reporting temporal memory | 271 // Creation time for this SdchOwner object, used for reporting temporal memory |
272 // pressure. | 272 // pressure. |
273 base::Time creation_time_; | 273 base::Time creation_time_; |
274 | 274 |
275 DISALLOW_COPY_AND_ASSIGN(SdchOwner); | 275 DISALLOW_COPY_AND_ASSIGN(SdchOwner); |
276 }; | 276 }; |
277 | 277 |
278 } // namespace net | 278 } // namespace net |
279 | 279 |
280 #endif // NET_SDCH_SDCH_OWNER_H_ | 280 #endif // NET_SDCH_SDCH_OWNER_H_ |
OLD | NEW |