summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 23:30:17 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 23:30:17 +0000
commite7e993263d1994d2aae4394e2eb220a8ce2b68e3 (patch)
tree2fa80cc8d3c19ef3be1c37be0f58ba17c2475056 /net/disk_cache
parent0a7da815724b3d3431c900d595aad1aad30f8cd7 (diff)
downloadchromium_src-e7e993263d1994d2aae4394e2eb220a8ce2b68e3.zip
chromium_src-e7e993263d1994d2aae4394e2eb220a8ce2b68e3.tar.gz
chromium_src-e7e993263d1994d2aae4394e2eb220a8ce2b68e3.tar.bz2
Fix some uses of scoped_ptr.release() in net/ such that the return value is not ignored.
client_socket_pool_base.cc change contributed by vandebo@chromium BUG=42904 TEST=existing net tests/ Review URL: http://codereview.chromium.org/1756019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46409 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/entry_impl.cc7
-rw-r--r--net/disk_cache/file_posix.cc4
2 files changed, 5 insertions, 6 deletions
diff --git a/net/disk_cache/entry_impl.cc b/net/disk_cache/entry_impl.cc
index 67fa32b..a1e0b32 100644
--- a/net/disk_cache/entry_impl.cc
+++ b/net/disk_cache/entry_impl.cc
@@ -861,15 +861,14 @@ bool EntryImpl::Flush(int index, int size, bool async) {
if (async) {
if (!file->PostWrite(user_buffers_[index].get(), len, offset))
return false;
+ // The buffer is deleted from the PostWrite operation.
+ ignore_result(user_buffers_[index].release());
} else {
if (!file->Write(user_buffers_[index].get(), len, offset, NULL, NULL))
return false;
user_buffers_[index].reset(NULL);
}
- // The buffer is deleted from the PostWrite operation.
- user_buffers_[index].release();
-
return true;
}
@@ -895,7 +894,7 @@ uint32 EntryImpl::GetEntryFlags() {
void EntryImpl::GetData(int index, char** buffer, Addr* address) {
if (user_buffers_[index].get()) {
- // The data is already in memory, just copy it an we're done.
+ // The data is already in memory, just copy it and we're done.
int data_len = entry_.Data()->data_size[index];
DCHECK(data_len <= kMaxBlockSize);
*buffer = new char[data_len];
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc
index bfaad59..cf621f4 100644
--- a/net/disk_cache/file_posix.cc
+++ b/net/disk_cache/file_posix.cc
@@ -122,8 +122,8 @@ class InFlightIO {
void PostRead(disk_cache::File* file, void* buf, size_t buf_len,
size_t offset, disk_cache::FileIOCallback* callback);
void PostWrite(disk_cache::File* file, const void* buf, size_t buf_len,
- size_t offset, disk_cache::FileIOCallback* callback,
- bool delete_buffer);
+ size_t offset, disk_cache::FileIOCallback* callback,
+ bool delete_buffer);
// Blocks the current thread until all IO operations tracked by this object
// complete.