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

Side by Side Diff: net/disk_cache/blockfile/in_flight_backend_io.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
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_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ 5 #ifndef NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
6 #define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ 6 #define NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void Init(); 54 void Init();
55 void OpenEntry(const std::string& key, Entry** entry); 55 void OpenEntry(const std::string& key, Entry** entry);
56 void CreateEntry(const std::string& key, Entry** entry); 56 void CreateEntry(const std::string& key, Entry** entry);
57 void DoomEntry(const std::string& key); 57 void DoomEntry(const std::string& key);
58 void DoomAllEntries(); 58 void DoomAllEntries();
59 void DoomEntriesBetween(const base::Time initial_time, 59 void DoomEntriesBetween(const base::Time initial_time,
60 const base::Time end_time); 60 const base::Time end_time);
61 void DoomEntriesSince(const base::Time initial_time); 61 void DoomEntriesSince(const base::Time initial_time);
62 void CalculateSizeOfAllEntries(); 62 void CalculateSizeOfAllEntries();
63 void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry); 63 void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry);
64 void EndEnumeration(scoped_ptr<Rankings::Iterator> iterator); 64 void EndEnumeration(std::unique_ptr<Rankings::Iterator> iterator);
65 void OnExternalCacheHit(const std::string& key); 65 void OnExternalCacheHit(const std::string& key);
66 void CloseEntryImpl(EntryImpl* entry); 66 void CloseEntryImpl(EntryImpl* entry);
67 void DoomEntryImpl(EntryImpl* entry); 67 void DoomEntryImpl(EntryImpl* entry);
68 void FlushQueue(); // Dummy operation. 68 void FlushQueue(); // Dummy operation.
69 void RunTask(const base::Closure& task); 69 void RunTask(const base::Closure& task);
70 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, 70 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
71 int buf_len); 71 int buf_len);
72 void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, 72 void WriteData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
73 int buf_len, bool truncate); 73 int buf_len, bool truncate);
74 void ReadSparseData(EntryImpl* entry, 74 void ReadSparseData(EntryImpl* entry,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 BackendImpl* backend_; 133 BackendImpl* backend_;
134 net::CompletionCallback callback_; 134 net::CompletionCallback callback_;
135 Operation operation_; 135 Operation operation_;
136 136
137 // The arguments of all the operations we proxy: 137 // The arguments of all the operations we proxy:
138 std::string key_; 138 std::string key_;
139 Entry** entry_ptr_; 139 Entry** entry_ptr_;
140 base::Time initial_time_; 140 base::Time initial_time_;
141 base::Time end_time_; 141 base::Time end_time_;
142 Rankings::Iterator* iterator_; 142 Rankings::Iterator* iterator_;
143 scoped_ptr<Rankings::Iterator> scoped_iterator_; 143 std::unique_ptr<Rankings::Iterator> scoped_iterator_;
144 EntryImpl* entry_; 144 EntryImpl* entry_;
145 int index_; 145 int index_;
146 int offset_; 146 int offset_;
147 scoped_refptr<net::IOBuffer> buf_; 147 scoped_refptr<net::IOBuffer> buf_;
148 int buf_len_; 148 int buf_len_;
149 bool truncate_; 149 bool truncate_;
150 int64_t offset64_; 150 int64_t offset64_;
151 int64_t* start_; 151 int64_t* start_;
152 base::TimeTicks start_time_; 152 base::TimeTicks start_time_;
153 base::Closure task_; 153 base::Closure task_;
(...skipping 19 matching lines...) Expand all
173 const net::CompletionCallback& callback); 173 const net::CompletionCallback& callback);
174 void DoomAllEntries(const net::CompletionCallback& callback); 174 void DoomAllEntries(const net::CompletionCallback& callback);
175 void DoomEntriesBetween(const base::Time initial_time, 175 void DoomEntriesBetween(const base::Time initial_time,
176 const base::Time end_time, 176 const base::Time end_time,
177 const net::CompletionCallback& callback); 177 const net::CompletionCallback& callback);
178 void DoomEntriesSince(const base::Time initial_time, 178 void DoomEntriesSince(const base::Time initial_time,
179 const net::CompletionCallback& callback); 179 const net::CompletionCallback& callback);
180 void CalculateSizeOfAllEntries(const net::CompletionCallback& callback); 180 void CalculateSizeOfAllEntries(const net::CompletionCallback& callback);
181 void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry, 181 void OpenNextEntry(Rankings::Iterator* iterator, Entry** next_entry,
182 const net::CompletionCallback& callback); 182 const net::CompletionCallback& callback);
183 void EndEnumeration(scoped_ptr<Rankings::Iterator> iterator); 183 void EndEnumeration(std::unique_ptr<Rankings::Iterator> iterator);
184 void OnExternalCacheHit(const std::string& key); 184 void OnExternalCacheHit(const std::string& key);
185 void CloseEntryImpl(EntryImpl* entry); 185 void CloseEntryImpl(EntryImpl* entry);
186 void DoomEntryImpl(EntryImpl* entry); 186 void DoomEntryImpl(EntryImpl* entry);
187 void FlushQueue(const net::CompletionCallback& callback); 187 void FlushQueue(const net::CompletionCallback& callback);
188 void RunTask(const base::Closure& task, 188 void RunTask(const base::Closure& task,
189 const net::CompletionCallback& callback); 189 const net::CompletionCallback& callback);
190 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf, 190 void ReadData(EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
191 int buf_len, const net::CompletionCallback& callback); 191 int buf_len, const net::CompletionCallback& callback);
192 void WriteData( 192 void WriteData(
193 EntryImpl* entry, int index, int offset, net::IOBuffer* buf, 193 EntryImpl* entry, int index, int offset, net::IOBuffer* buf,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 BackendImpl* backend_; 234 BackendImpl* backend_;
235 scoped_refptr<base::SingleThreadTaskRunner> background_thread_; 235 scoped_refptr<base::SingleThreadTaskRunner> background_thread_;
236 base::WeakPtrFactory<InFlightBackendIO> ptr_factory_; 236 base::WeakPtrFactory<InFlightBackendIO> ptr_factory_;
237 237
238 DISALLOW_COPY_AND_ASSIGN(InFlightBackendIO); 238 DISALLOW_COPY_AND_ASSIGN(InFlightBackendIO);
239 }; 239 };
240 240
241 } // namespace disk_cache 241 } // namespace disk_cache
242 242
243 #endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_ 243 #endif // NET_DISK_CACHE_BLOCKFILE_IN_FLIGHT_BACKEND_IO_H_
OLDNEW
« no previous file with comments | « net/disk_cache/blockfile/entry_impl_v3.cc ('k') | net/disk_cache/blockfile/in_flight_backend_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698