Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: net/sdch/sdch_owner.h

Issue 2648323005: memory coordinator: Add MemoryCoordinatorClient::OnPurgeMemory() (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698