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

Side by Side Diff: net/disk_cache/blockfile/backend_impl_v3.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/blockfile/backend_impl.cc ('k') | net/disk_cache/blockfile/backend_impl_v3.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 // 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_BLOCKFILE_BACKEND_IMPL_V3_H_ 7 #ifndef NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ 8 #define NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
9 9
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 const CompletionCallback& callback) override; 185 const CompletionCallback& callback) override;
186 int DoomEntry(const std::string& key, 186 int DoomEntry(const std::string& key,
187 const CompletionCallback& callback) override; 187 const CompletionCallback& callback) override;
188 int DoomAllEntries(const CompletionCallback& callback) override; 188 int DoomAllEntries(const CompletionCallback& callback) override;
189 int DoomEntriesBetween(base::Time initial_time, 189 int DoomEntriesBetween(base::Time initial_time,
190 base::Time end_time, 190 base::Time end_time,
191 const CompletionCallback& callback) override; 191 const CompletionCallback& callback) override;
192 int DoomEntriesSince(base::Time initial_time, 192 int DoomEntriesSince(base::Time initial_time,
193 const CompletionCallback& callback) override; 193 const CompletionCallback& callback) override;
194 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override; 194 int CalculateSizeOfAllEntries(const CompletionCallback& callback) override;
195 scoped_ptr<Iterator> CreateIterator() override; 195 std::unique_ptr<Iterator> CreateIterator() override;
196 void GetStats(StatsItems* stats) override; 196 void GetStats(StatsItems* stats) override;
197 void OnExternalCacheHit(const std::string& key) override; 197 void OnExternalCacheHit(const std::string& key) override;
198 198
199 private: 199 private:
200 friend class EvictionV3; 200 friend class EvictionV3;
201 typedef base::hash_map<CacheAddr, EntryImplV3*> EntriesMap; 201 typedef base::hash_map<CacheAddr, EntryImplV3*> EntriesMap;
202 class IteratorImpl; 202 class IteratorImpl;
203 class NotImplementedIterator; 203 class NotImplementedIterator;
204 class Worker; 204 class Worker;
205 205
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 bool restarted_; 268 bool restarted_;
269 bool read_only_; // Prevents updates of the rankings data (used by tools). 269 bool read_only_; // Prevents updates of the rankings data (used by tools).
270 bool disabled_; 270 bool disabled_;
271 bool lru_eviction_; // What eviction algorithm should be used. 271 bool lru_eviction_; // What eviction algorithm should be used.
272 bool first_timer_; // True if the timer has not been called. 272 bool first_timer_; // True if the timer has not been called.
273 bool user_load_; // True if we see a high load coming from the caller. 273 bool user_load_; // True if we see a high load coming from the caller.
274 274
275 net::NetLog* net_log_; 275 net::NetLog* net_log_;
276 276
277 Stats stats_; // Usage statistics. 277 Stats stats_; // Usage statistics.
278 scoped_ptr<base::RepeatingTimer> timer_; // Usage timer. 278 std::unique_ptr<base::RepeatingTimer> timer_; // Usage timer.
279 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing. 279 scoped_refptr<TraceObject> trace_object_; // Initializes internal tracing.
280 base::WeakPtrFactory<BackendImplV3> ptr_factory_; 280 base::WeakPtrFactory<BackendImplV3> ptr_factory_;
281 281
282 DISALLOW_COPY_AND_ASSIGN(BackendImplV3); 282 DISALLOW_COPY_AND_ASSIGN(BackendImplV3);
283 }; 283 };
284 284
285 } // namespace disk_cache 285 } // namespace disk_cache
286 286
287 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_ 287 #endif // NET_DISK_CACHE_BLOCKFILE_BACKEND_IMPL_V3_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/backend_impl.cc ('k') | net/disk_cache/blockfile/backend_impl_v3.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698