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

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

Issue 935073003: Instrument SdchOwner for clock nullification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed try job errors. Created 5 years, 10 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 <string> 8 #include <string>
9 9
10 #include "base/memory/memory_pressure_listener.h" 10 #include "base/memory/memory_pressure_listener.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 DictionaryInfo() : use_count(0), size(0) {} 69 DictionaryInfo() : use_count(0), size(0) {}
70 DictionaryInfo(const base::Time& last_used, size_t size) 70 DictionaryInfo(const base::Time& last_used, size_t size)
71 : last_used(last_used), use_count(0), size(size) {} 71 : last_used(last_used), use_count(0), size(size) {}
72 DictionaryInfo(const DictionaryInfo& rhs) = default; 72 DictionaryInfo(const DictionaryInfo& rhs) = default;
73 DictionaryInfo& operator=(const DictionaryInfo& rhs) = default; 73 DictionaryInfo& operator=(const DictionaryInfo& rhs) = default;
74 }; 74 };
75 75
76 void OnMemoryPressure( 76 void OnMemoryPressure(
77 base::MemoryPressureListener::MemoryPressureLevel level); 77 base::MemoryPressureListener::MemoryPressureLevel level);
78 78
79 // For debugging http://crbug.com/454198; remove when resolved.
80 void AssertNotDestroyedAndClockNotNull(int line, const GURL& url);
81
79 net::SdchManager* manager_; 82 net::SdchManager* manager_;
80 net::SdchDictionaryFetcher fetcher_; 83 net::SdchDictionaryFetcher fetcher_;
81 84
82 std::map<std::string, DictionaryInfo> local_dictionary_info_; 85 std::map<std::string, DictionaryInfo> local_dictionary_info_;
83 size_t total_dictionary_bytes_; 86 size_t total_dictionary_bytes_;
84 87
85 scoped_ptr<base::Clock> clock_; 88 scoped_ptr<base::Clock> clock_;
86 89
87 size_t max_total_dictionary_size_; 90 size_t max_total_dictionary_size_;
88 size_t min_space_for_dictionary_fetch_; 91 size_t min_space_for_dictionary_fetch_;
89 92
93 #if defined(OS_CHROMEOS)
94 // For debugging http://crbug.com/454198; remove when resolved.
95 unsigned int destroyed_;
96 #endif
97
90 base::MemoryPressureListener memory_pressure_listener_; 98 base::MemoryPressureListener memory_pressure_listener_;
91 99
92 DISALLOW_COPY_AND_ASSIGN(SdchOwner); 100 DISALLOW_COPY_AND_ASSIGN(SdchOwner);
93 }; 101 };
94 102
95 } // namespace net 103 } // namespace net
96 104
97 #endif // NET_SDCH_SDCH_OWNER_H_ 105 #endif // NET_SDCH_SDCH_OWNER_H_
OLDNEW
« no previous file with comments | « net/base/sdch_manager.cc ('k') | net/sdch/sdch_owner.cc » ('j') | net/sdch/sdch_owner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698