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

Side by Side Diff: net/disk_cache/file_posix.cc

Issue 1756019: Fix some uses of scoped_ptr.release() in net/ such that the return value is not ignored. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: add back the change that got lost in the void Created 10 years, 7 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/entry_impl.cc ('k') | net/socket/client_socket_pool_base.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #include "net/disk_cache/file.h" 5 #include "net/disk_cache/file.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 public: 115 public:
116 InFlightIO() : callback_thread_(MessageLoop::current()) {} 116 InFlightIO() : callback_thread_(MessageLoop::current()) {}
117 ~InFlightIO() {} 117 ~InFlightIO() {}
118 118
119 // These methods start an asynchronous operation. The arguments have the same 119 // These methods start an asynchronous operation. The arguments have the same
120 // semantics of the File asynchronous operations, with the exception that the 120 // semantics of the File asynchronous operations, with the exception that the
121 // operation never finishes synchronously. 121 // operation never finishes synchronously.
122 void PostRead(disk_cache::File* file, void* buf, size_t buf_len, 122 void PostRead(disk_cache::File* file, void* buf, size_t buf_len,
123 size_t offset, disk_cache::FileIOCallback* callback); 123 size_t offset, disk_cache::FileIOCallback* callback);
124 void PostWrite(disk_cache::File* file, const void* buf, size_t buf_len, 124 void PostWrite(disk_cache::File* file, const void* buf, size_t buf_len,
125 size_t offset, disk_cache::FileIOCallback* callback, 125 size_t offset, disk_cache::FileIOCallback* callback,
126 bool delete_buffer); 126 bool delete_buffer);
127 127
128 // Blocks the current thread until all IO operations tracked by this object 128 // Blocks the current thread until all IO operations tracked by this object
129 // complete. 129 // complete.
130 void WaitForPendingIO(); 130 void WaitForPendingIO();
131 131
132 // Called on a worker thread when |operation| completes. 132 // Called on a worker thread when |operation| completes.
133 void OnIOComplete(BackgroundIO* operation); 133 void OnIOComplete(BackgroundIO* operation);
134 134
135 // Invokes the users' completion callback at the end of the IO operation. 135 // Invokes the users' completion callback at the end of the IO operation.
136 // |cancel_task| is true if the actual task posted to the thread is still 136 // |cancel_task| is true if the actual task posted to the thread is still
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 return ret; 370 return ret;
371 } 371 }
372 372
373 // Static. 373 // Static.
374 void File::WaitForPendingIO(int* num_pending_io) { 374 void File::WaitForPendingIO(int* num_pending_io) {
375 if (*num_pending_io) 375 if (*num_pending_io)
376 Singleton<InFlightIO>::get()->WaitForPendingIO(); 376 Singleton<InFlightIO>::get()->WaitForPendingIO();
377 } 377 }
378 378
379 } // namespace disk_cache 379 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/entry_impl.cc ('k') | net/socket/client_socket_pool_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698