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

Side by Side Diff: net/disk_cache/blockfile/backend_impl.h

Issue 2779733002: [HttpCache] Store some memcache info to memory dumps for debugging (Closed)
Patch Set: Rebase xunjieli's change Created 3 years, 8 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
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/blockfile/backend_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // See net/disk_cache/disk_cache.h for the public interface of the cache. 5 // See net/disk_cache/disk_cache.h for the public interface of the cache.
6 6
7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 // the last_used field of the entry, and therefore it does not impact the 287 // the last_used field of the entry, and therefore it does not impact the
288 // eviction ranking of the entry. However, an enumeration will go through all 288 // eviction ranking of the entry. However, an enumeration will go through all
289 // entries on the cache only if the cache is not modified while the 289 // entries on the cache only if the cache is not modified while the
290 // enumeration is taking place. Significantly altering the entry pointed by 290 // enumeration is taking place. Significantly altering the entry pointed by
291 // the iterator (for example, deleting the entry) will invalidate the 291 // the iterator (for example, deleting the entry) will invalidate the
292 // iterator. Performing operations on an entry that modify the entry may 292 // iterator. Performing operations on an entry that modify the entry may
293 // result in loops in the iteration, skipped entries or similar. 293 // result in loops in the iteration, skipped entries or similar.
294 std::unique_ptr<Iterator> CreateIterator() override; 294 std::unique_ptr<Iterator> CreateIterator() override;
295 void GetStats(StatsItems* stats) override; 295 void GetStats(StatsItems* stats) override;
296 void OnExternalCacheHit(const std::string& key) override; 296 void OnExternalCacheHit(const std::string& key) override;
297 size_t EstimateMemoryUsage() const override; 297 size_t DumpMemoryStats(
298 base::trace_event::ProcessMemoryDump* pmd,
299 const std::string& parent_absolute_name) const override;
298 300
299 private: 301 private:
300 using EntriesMap = std::unordered_map<CacheAddr, EntryImpl*>; 302 using EntriesMap = std::unordered_map<CacheAddr, EntryImpl*>;
301 class IteratorImpl; 303 class IteratorImpl;
302 304
303 // Creates a new backing file for the cache index. 305 // Creates a new backing file for the cache index.
304 bool CreateBackingStore(disk_cache::File* file); 306 bool CreateBackingStore(disk_cache::File* file);
305 bool InitBackingStore(bool* file_created); 307 bool InitBackingStore(bool* file_created);
306 void AdjustMaxCacheSize(int table_len); 308 void AdjustMaxCacheSize(int table_len);
307 309
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 base::WaitableEvent done_; // Signals the end of background work. 415 base::WaitableEvent done_; // Signals the end of background work.
414 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. 416 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing.
415 base::WeakPtrFactory<BackendImpl> ptr_factory_; 417 base::WeakPtrFactory<BackendImpl> ptr_factory_;
416 418
417 DISALLOW_COPY_AND_ASSIGN(BackendImpl); 419 DISALLOW_COPY_AND_ASSIGN(BackendImpl);
418 }; 420 };
419 421
420 } // namespace disk_cache 422 } // namespace disk_cache
421 423
422 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_ 424 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/backend_unittest.cc ('k') | net/disk_cache/blockfile/backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698