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

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

Issue 3814013: FBTF: Monster ctor patch after changing heuristics in clang plugin. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: More add file fail Created 10 years, 2 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 | « net/disk_cache/file.cc ('k') | net/disk_cache/mem_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_MEM_BACKEND_IMPL_H__ 7 #ifndef NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
8 #define NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ 8 #define NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
9 #pragma once 9 #pragma once
10 10
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 12
13 #include "net/disk_cache/disk_cache.h" 13 #include "net/disk_cache/disk_cache.h"
14 #include "net/disk_cache/mem_rankings.h" 14 #include "net/disk_cache/mem_rankings.h"
15 15
16 namespace disk_cache { 16 namespace disk_cache {
17 17
18 class MemEntryImpl; 18 class MemEntryImpl;
19 19
20 // This class implements the Backend interface. An object of this class handles 20 // This class implements the Backend interface. An object of this class handles
21 // the operations of the cache without writing to disk. 21 // the operations of the cache without writing to disk.
22 class MemBackendImpl : public Backend { 22 class MemBackendImpl : public Backend {
23 public: 23 public:
24 MemBackendImpl() : max_size_(0), current_size_(0) {} 24 MemBackendImpl();
25 ~MemBackendImpl(); 25 ~MemBackendImpl();
26 26
27 // Returns an instance of a Backend implemented only in memory. The returned 27 // Returns an instance of a Backend implemented only in memory. The returned
28 // object should be deleted when not needed anymore. max_bytes is the maximum 28 // object should be deleted when not needed anymore. max_bytes is the maximum
29 // size the cache can grow to. If zero is passed in as max_bytes, the cache 29 // size the cache can grow to. If zero is passed in as max_bytes, the cache
30 // will determine the value to use based on the available memory. The returned 30 // will determine the value to use based on the available memory. The returned
31 // pointer can be NULL if a fatal error is found. 31 // pointer can be NULL if a fatal error is found.
32 static Backend* CreateBackend(int max_bytes); 32 static Backend* CreateBackend(int max_bytes);
33 33
34 // Performs general initialization for this current instance of the cache. 34 // Performs general initialization for this current instance of the cache.
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 MemRankings rankings_; // Rankings to be able to trim the cache. 103 MemRankings rankings_; // Rankings to be able to trim the cache.
104 int32 max_size_; // Maximum data size for this instance. 104 int32 max_size_; // Maximum data size for this instance.
105 int32 current_size_; 105 int32 current_size_;
106 106
107 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl); 107 DISALLOW_COPY_AND_ASSIGN(MemBackendImpl);
108 }; 108 };
109 109
110 } // namespace disk_cache 110 } // namespace disk_cache
111 111
112 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__ 112 #endif // NET_DISK_CACHE_MEM_BACKEND_IMPL_H__
OLDNEW
« no previous file with comments | « net/disk_cache/file.cc ('k') | net/disk_cache/mem_backend_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698