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

Side by Side Diff: net/disk_cache/simple/simple_entry_impl.h

Issue 13913010: Add Cache size to the Simple Index. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: syncing Created 7 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 | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/simple/simple_disk_format.cc ('k') | net/disk_cache/simple/simple_entry_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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 5 #ifndef NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 6 #define NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::WeakPtr<SimpleIndex> index, 93 base::WeakPtr<SimpleIndex> index,
94 const CompletionCallback& completion_callback, 94 const CompletionCallback& completion_callback,
95 const std::string& key, 95 const std::string& key,
96 Entry** out_entry, 96 Entry** out_entry,
97 SimpleSynchronousEntry* sync_entry); 97 SimpleSynchronousEntry* sync_entry);
98 98
99 // Called after a SimpleSynchronousEntry has completed an asynchronous IO 99 // Called after a SimpleSynchronousEntry has completed an asynchronous IO
100 // operation, such as ReadData() or WriteData(). Calls |completion_callback|. 100 // operation, such as ReadData() or WriteData(). Calls |completion_callback|.
101 // If |entry| no longer exists, then it ensures |sync_entry| is closed. 101 // If |entry| no longer exists, then it ensures |sync_entry| is closed.
102 static void EntryOperationComplete( 102 static void EntryOperationComplete(
103 base::WeakPtr<SimpleIndex> index,
103 const CompletionCallback& completion_callback, 104 const CompletionCallback& completion_callback,
104 base::WeakPtr<SimpleEntryImpl> entry, 105 base::WeakPtr<SimpleEntryImpl> entry,
105 SimpleSynchronousEntry* sync_entry, 106 SimpleSynchronousEntry* sync_entry,
106 int result); 107 int result);
107 108
108 // Called on construction and also after the completion of asynchronous IO to 109 // Called on construction and also after the completion of asynchronous IO to
109 // initialize the IO thread copies of data returned by synchronous accessor 110 // initialize the IO thread copies of data returned by synchronous accessor
110 // functions. Copies data from |synchronous_entry_| into |this|, so that 111 // functions. Copies data from |synchronous_entry_| into |this|, so that
111 // values can be returned during our next IO operation. 112 // values can be returned during our next IO operation.
112 void SetSynchronousData(); 113 void SetSynchronousData();
(...skipping 26 matching lines...) Expand all
139 // and false after. Used to ensure thread safety by not allowing multiple 140 // and false after. Used to ensure thread safety by not allowing multiple
140 // threads to access the |synchronous_entry_| simultaneously. 141 // threads to access the |synchronous_entry_| simultaneously.
141 bool synchronous_entry_in_use_by_worker_; 142 bool synchronous_entry_in_use_by_worker_;
142 143
143 base::WeakPtr<SimpleIndex> index_; 144 base::WeakPtr<SimpleIndex> index_;
144 }; 145 };
145 146
146 } // namespace disk_cache 147 } // namespace disk_cache
147 148
148 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_ 149 #endif // NET_DISK_CACHE_SIMPLE_SIMPLE_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_disk_format.cc ('k') | net/disk_cache/simple/simple_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698