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

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

Issue 42682: Disk Cache: Second pass (and final) to allow multiple instances... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | net/disk_cache/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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 9
10 #include "base/timer.h" 10 #include "base/timer.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 98
99 // Returns the maximum size for a file to reside on the cache. 99 // Returns the maximum size for a file to reside on the cache.
100 int MaxFileSize() const; 100 int MaxFileSize() const;
101 101
102 // A user data block is being created, extended or truncated. 102 // A user data block is being created, extended or truncated.
103 void ModifyStorageSize(int32 old_size, int32 new_size); 103 void ModifyStorageSize(int32 old_size, int32 new_size);
104 104
105 // Logs requests that are denied due to being too big. 105 // Logs requests that are denied due to being too big.
106 void TooMuchStorageRequested(int32 size); 106 void TooMuchStorageRequested(int32 size);
107 107
108 // Returns the full histogram name, for the given base |name| and experiment,
109 // and the current cache type. The name will be "DiskCache.t.name_e" where n
110 // is th ecache type and e the provided |experiment|.
111 std::string HistogramName(const char* name, int experiment);
112
113 net::CacheType cache_type() {
114 return cache_type_;
115 }
116
108 // Returns true if we should send histograms for this user again. The caller 117 // Returns true if we should send histograms for this user again. The caller
109 // must call this function only once per run (because it returns always the 118 // must call this function only once per run (because it returns always the
110 // same thing on a given run). 119 // same thing on a given run).
111 bool ShouldReportAgain(); 120 bool ShouldReportAgain();
112 121
113 // Reports some data when we filled up the cache. 122 // Reports some data when we filled up the cache.
114 void FirstEviction(); 123 void FirstEviction();
115 124
116 // Reports a critical error (and disables the cache). 125 // Reports a critical error (and disables the cache).
117 void CriticalError(int error); 126 void CriticalError(int error);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 Stats stats_; // Usage statistcs. 243 Stats stats_; // Usage statistcs.
235 base::RepeatingTimer<BackendImpl> timer_; // Usage timer. 244 base::RepeatingTimer<BackendImpl> timer_; // Usage timer.
236 scoped_refptr<TraceObject> trace_object_; // Inits internal tracing. 245 scoped_refptr<TraceObject> trace_object_; // Inits internal tracing.
237 246
238 DISALLOW_EVIL_CONSTRUCTORS(BackendImpl); 247 DISALLOW_EVIL_CONSTRUCTORS(BackendImpl);
239 }; 248 };
240 249
241 } // namespace disk_cache 250 } // namespace disk_cache
242 251
243 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_ 252 #endif // NET_DISK_CACHE_BACKEND_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698