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

Side by Side Diff: net/disk_cache/memory/mem_entry_impl.h

Issue 1884453002: Revert of Convert //net and //chromecast to std::unordered_* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/memory/mem_backend_impl.h ('k') | net/disk_cache/simple/simple_backend_impl.h » ('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 #ifndef NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ 5 #ifndef NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
6 #define NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ 6 #define NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
11 #include <unordered_map>
12 #include <vector> 11 #include <vector>
13 12
13 #include "base/containers/hash_tables.h"
14 #include "base/containers/linked_list.h" 14 #include "base/containers/linked_list.h"
15 #include "base/gtest_prod_util.h" 15 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 16 #include "base/macros.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/time/time.h" 18 #include "base/time/time.h"
19 #include "net/disk_cache/disk_cache.h" 19 #include "net/disk_cache/disk_cache.h"
20 #include "net/log/net_log.h" 20 #include "net/log/net_log.h"
21 21
22 namespace disk_cache { 22 namespace disk_cache {
23 23
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void CancelSparseIO() override {} 126 void CancelSparseIO() override {}
127 int ReadyForSparseIO(const CompletionCallback& callback) override; 127 int ReadyForSparseIO(const CompletionCallback& callback) override;
128 128
129 private: 129 private:
130 MemEntryImpl(MemBackendImpl* backend, 130 MemEntryImpl(MemBackendImpl* backend,
131 const std::string& key, 131 const std::string& key,
132 int child_id, 132 int child_id,
133 MemEntryImpl* parent, 133 MemEntryImpl* parent,
134 net::NetLog* net_log); 134 net::NetLog* net_log);
135 135
136 using EntryMap = std::unordered_map<int, MemEntryImpl*>; 136 typedef base::hash_map<int, MemEntryImpl*> EntryMap;
137 137
138 static const int kNumStreams = 3; 138 static const int kNumStreams = 3;
139 139
140 ~MemEntryImpl() override; 140 ~MemEntryImpl() override;
141 141
142 // Do all the work for corresponding public functions. Implemented as 142 // Do all the work for corresponding public functions. Implemented as
143 // separate functions to make logging of results simpler. 143 // separate functions to make logging of results simpler.
144 int InternalReadData(int index, int offset, IOBuffer* buf, int buf_len); 144 int InternalReadData(int index, int offset, IOBuffer* buf, int buf_len);
145 int InternalWriteData(int index, int offset, IOBuffer* buf, int buf_len, 145 int InternalWriteData(int index, int offset, IOBuffer* buf, int buf_len,
146 bool truncate); 146 bool truncate);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 bool doomed_; // True if this entry was removed from the cache. 180 bool doomed_; // True if this entry was removed from the cache.
181 181
182 net::BoundNetLog net_log_; 182 net::BoundNetLog net_log_;
183 183
184 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl); 184 DISALLOW_COPY_AND_ASSIGN(MemEntryImpl);
185 }; 185 };
186 186
187 } // namespace disk_cache 187 } // namespace disk_cache
188 188
189 #endif // NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_ 189 #endif // NET_DISK_CACHE_MEMORY_MEM_ENTRY_IMPL_H_
OLDNEW
« no previous file with comments | « net/disk_cache/memory/mem_backend_impl.h ('k') | net/disk_cache/simple/simple_backend_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698