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

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

Issue 1894733002: Change scoped_ptr to std::unique_ptr in //net/disk_cache. (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.cc ('k') | net/disk_cache/memory/mem_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) 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 <memory>
10 #include <string> 11 #include <string>
11 #include <vector> 12 #include <vector>
12 13
13 #include "base/containers/hash_tables.h" 14 #include "base/containers/hash_tables.h"
14 #include "base/containers/linked_list.h" 15 #include "base/containers/linked_list.h"
15 #include "base/gtest_prod_util.h" 16 #include "base/gtest_prod_util.h"
16 #include "base/macros.h" 17 #include "base/macros.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
24 class MemBackendImpl; 24 class MemBackendImpl;
25 25
26 // This class implements the Entry interface for the memory-only cache. An 26 // This class implements the Entry interface for the memory-only cache. An
27 // object of this class represents a single entry on the cache. We use two types 27 // object of this class represents a single entry on the cache. We use two types
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 165
166 std::string key_; 166 std::string key_;
167 std::vector<char> data_[kNumStreams]; // User data. 167 std::vector<char> data_[kNumStreams]; // User data.
168 int ref_count_; 168 int ref_count_;
169 169
170 int child_id_; // The ID of a child entry. 170 int child_id_; // The ID of a child entry.
171 int child_first_pos_; // The position of the first byte in a child 171 int child_first_pos_; // The position of the first byte in a child
172 // entry. 172 // entry.
173 // Pointer to the parent entry, or nullptr if this entry is a parent entry. 173 // Pointer to the parent entry, or nullptr if this entry is a parent entry.
174 MemEntryImpl* parent_; 174 MemEntryImpl* parent_;
175 scoped_ptr<EntryMap> children_; 175 std::unique_ptr<EntryMap> children_;
176 176
177 base::Time last_modified_; 177 base::Time last_modified_;
178 base::Time last_used_; 178 base::Time last_used_;
179 MemBackendImpl* backend_; // Back pointer to the cache. 179 MemBackendImpl* backend_; // Back pointer to the cache.
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.cc ('k') | net/disk_cache/memory/mem_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698