summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:15:57 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-02 20:15:57 +0000
commit00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1 (patch)
treeeb61d6402a5e967e5eb1d41dfde730af48dfa55f /net/disk_cache
parentd9b888cdf9ad654a3f2e5c22b935e68db77a71ef (diff)
downloadchromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.zip
chromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.tar.gz
chromium_src-00cd9c4e71d1e6dd6cc3a2fff60505479304c9d1.tar.bz2
Convert implicit scoped_refptr constructor calls to explicit ones, part 2
This CL was created automatically by this clang rewriter: http://codereview.appspot.com/2826041 I then did quite a bit of manual editing to fix style issues. BUG=28083 TEST=None Review URL: http://codereview.chromium.org/4291001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64798 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/file_posix.cc6
-rw-r--r--net/disk_cache/in_flight_backend_io.cc2
-rw-r--r--net/disk_cache/in_flight_io.cc4
3 files changed, 6 insertions, 6 deletions
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc
index bade848..a8d74ae 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);
}
diff --git a/net/disk_cache/in_flight_backend_io.cc b/net/disk_cache/in_flight_backend_io.cc
index 8fafa4d..c4caed3 100644
--- a/net/disk_cache/in_flight_backend_io.cc
+++ b/net/disk_cache/in_flight_backend_io.cc
@@ -513,7 +513,7 @@ void InFlightBackendIO::QueueOperationToList(BackendIO* operation,
if (list->empty())
return PostOperation(operation);
- list->push_back(operation);
+ list->push_back(make_scoped_refptr(operation));
}
} // namespace
diff --git a/net/disk_cache/in_flight_io.cc b/net/disk_cache/in_flight_io.cc
index 5c859af..ba24d61 100644
--- a/net/disk_cache/in_flight_io.cc
+++ b/net/disk_cache/in_flight_io.cc
@@ -74,14 +74,14 @@ void InFlightIO::InvokeCallback(BackgroundIO* operation, bool cancel_task) {
// Make sure that we remove the operation from the list before invoking the
// callback (so that a subsequent cancel does not invoke the callback again).
DCHECK(io_list_.find(operation) != io_list_.end());
- io_list_.erase(operation);
+ io_list_.erase(make_scoped_refptr(operation));
OnOperationComplete(operation, cancel_task);
}
// Runs on the primary thread.
void InFlightIO::OnOperationPosted(BackgroundIO* operation) {
DCHECK(callback_thread_->BelongsToCurrentThread());
- io_list_.insert(operation);
+ io_list_.insert(make_scoped_refptr(operation));
}
} // namespace disk_cache