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

Unified Diff: net/disk_cache/file_posix.cc

Issue 4291001: Convert implicit scoped_refptr constructor calls to explicit ones, part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/build
Patch Set: comments Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/disk_cache/in_flight_backend_io.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/file_posix.cc
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc
index bade8487a7a33ae014fef6f9d18f1080b466bdad..a8d74aef58defaa8fe308d512cbfabf9a6b3ddcc 100644
--- a/net/disk_cache/file_posix.cc
+++ b/net/disk_cache/file_posix.cc
@@ -184,7 +184,7 @@ void InFlightIO::PostRead(disk_cache::File *file, void* buf, size_t buf_len,
size_t offset, disk_cache::FileIOCallback *callback) {
scoped_refptr<BackgroundIO> operation(
new BackgroundIO(file, buf, buf_len, offset, callback, this));
- io_list_.insert(operation.get());
+ io_list_.insert(operation);
file->AddRef(); // Balanced on InvokeCallback()
if (!callback_thread_)
@@ -200,7 +200,7 @@ void InFlightIO::PostWrite(disk_cache::File* file, const void* buf,
disk_cache::FileIOCallback* callback) {
scoped_refptr<BackgroundIO> operation(
new BackgroundIO(file, buf, buf_len, offset, callback, this));
- io_list_.insert(operation.get());
+ io_list_.insert(operation);
file->AddRef(); // Balanced on InvokeCallback()
if (!callback_thread_)
@@ -241,7 +241,7 @@ void InFlightIO::InvokeCallback(BackgroundIO* operation, bool cancel_task) {
// Release the references acquired in PostRead / PostWrite.
operation->file()->Release();
- io_list_.erase(operation);
+ io_list_.erase(make_scoped_refptr(operation));
callback->OnFileIOComplete(bytes);
}
« no previous file with comments | « net/base/host_resolver_impl.cc ('k') | net/disk_cache/in_flight_backend_io.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698