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> |
| 9 #include <stdint.h> |
| 10 |
8 #include <map> | 11 #include <map> |
9 #include <string> | 12 #include <string> |
10 | 13 |
| 14 #include "base/macros.h" |
11 #include "base/memory/memory_pressure_listener.h" | 15 #include "base/memory/memory_pressure_listener.h" |
12 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
13 #include "base/prefs/pref_store.h" | 17 #include "base/prefs/pref_store.h" |
14 #include "net/base/sdch_observer.h" | 18 #include "net/base/sdch_observer.h" |
15 #include "net/url_request/sdch_dictionary_fetcher.h" | 19 #include "net/url_request/sdch_dictionary_fetcher.h" |
16 | 20 |
17 class GURL; | 21 class GURL; |
18 class PersistentPrefStore; | 22 class PersistentPrefStore; |
19 class ValueMapPrefStore; | 23 class ValueMapPrefStore; |
20 class WriteablePrefStore; | 24 class WriteablePrefStore; |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // since the UMA histogram for use counts is only supposed to be since last | 200 // since the UMA histogram for use counts is only supposed to be since last |
197 // load. | 201 // load. |
198 std::map<std::string, int> use_counts_at_load_; | 202 std::map<std::string, int> use_counts_at_load_; |
199 | 203 |
200 // Load times for loaded dictionaries, keyed by server hash. These are used to | 204 // Load times for loaded dictionaries, keyed by server hash. These are used to |
201 // track the durations that dictionaries are in memory. | 205 // track the durations that dictionaries are in memory. |
202 std::map<std::string, base::Time> load_times_; | 206 std::map<std::string, base::Time> load_times_; |
203 | 207 |
204 // Byte-seconds consumed by dictionaries that have been unloaded. These are | 208 // Byte-seconds consumed by dictionaries that have been unloaded. These are |
205 // stored for later uploading in the SdchOwner destructor. | 209 // stored for later uploading in the SdchOwner destructor. |
206 std::vector<int64> consumed_byte_seconds_; | 210 std::vector<int64_t> consumed_byte_seconds_; |
207 | 211 |
208 // Creation time for this SdchOwner object, used for reporting temporal memory | 212 // Creation time for this SdchOwner object, used for reporting temporal memory |
209 // pressure. | 213 // pressure. |
210 base::Time creation_time_; | 214 base::Time creation_time_; |
211 | 215 |
212 DISALLOW_COPY_AND_ASSIGN(SdchOwner); | 216 DISALLOW_COPY_AND_ASSIGN(SdchOwner); |
213 }; | 217 }; |
214 | 218 |
215 } // namespace net | 219 } // namespace net |
216 | 220 |
217 #endif // NET_SDCH_SDCH_OWNER_H_ | 221 #endif // NET_SDCH_SDCH_OWNER_H_ |
OLD | NEW |