OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BACKEND_IMPL_H_ | 7 #ifndef NET_DISK_CACHE_BACKEND_IMPL_H_ |
8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ | 8 #define NET_DISK_CACHE_BACKEND_IMPL_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 uint32 mask_; // Binary mask to map a hash to the hash table. | 350 uint32 mask_; // Binary mask to map a hash to the hash table. |
351 int32 max_size_; // Maximum data size for this instance. | 351 int32 max_size_; // Maximum data size for this instance. |
352 Eviction eviction_; // Handler of the eviction algorithm. | 352 Eviction eviction_; // Handler of the eviction algorithm. |
353 EntriesMap open_entries_; // Map of open entries. | 353 EntriesMap open_entries_; // Map of open entries. |
354 int num_refs_; // Number of referenced cache entries. | 354 int num_refs_; // Number of referenced cache entries. |
355 int max_refs_; // Max number of referenced cache entries. | 355 int max_refs_; // Max number of referenced cache entries. |
356 int num_pending_io_; // Number of pending IO operations. | 356 int num_pending_io_; // Number of pending IO operations. |
357 int entry_count_; // Number of entries accessed lately. | 357 int entry_count_; // Number of entries accessed lately. |
358 int byte_count_; // Number of bytes read/written lately. | 358 int byte_count_; // Number of bytes read/written lately. |
359 int buffer_bytes_; // Total size of the temporary entries' buffers. | 359 int buffer_bytes_; // Total size of the temporary entries' buffers. |
360 int io_delay_; // Average time (ms) required to complete some IO operations. | 360 int up_ticks_; // The number of timer ticks received (OnStatsTimer). |
361 net::CacheType cache_type_; | 361 net::CacheType cache_type_; |
362 int uma_report_; // Controls transmision of UMA data. | 362 int uma_report_; // Controls transmision of UMA data. |
363 uint32 user_flags_; // Flags set by the user. | 363 uint32 user_flags_; // Flags set by the user. |
364 bool init_; // controls the initialization of the system. | 364 bool init_; // controls the initialization of the system. |
365 bool restarted_; | 365 bool restarted_; |
366 bool unit_test_; | 366 bool unit_test_; |
367 bool read_only_; // Prevents updates of the rankings data (used by tools). | 367 bool read_only_; // Prevents updates of the rankings data (used by tools). |
368 bool disabled_; | 368 bool disabled_; |
369 bool new_eviction_; // What eviction algorithm should be used. | 369 bool new_eviction_; // What eviction algorithm should be used. |
370 bool first_timer_; // True if the timer has not been called. | 370 bool first_timer_; // True if the timer has not been called. |
(...skipping 10 matching lines...) Expand all Loading... |
381 | 381 |
382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); | 382 DISALLOW_COPY_AND_ASSIGN(BackendImpl); |
383 }; | 383 }; |
384 | 384 |
385 // Returns the prefered max cache size given the available disk space. | 385 // Returns the prefered max cache size given the available disk space. |
386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); | 386 NET_EXPORT_PRIVATE int PreferedCacheSize(int64 available); |
387 | 387 |
388 } // namespace disk_cache | 388 } // namespace disk_cache |
389 | 389 |
390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ | 390 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ |
OLD | NEW |