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

Unified Diff: net/disk_cache/mem_entry_impl.cc

Issue 21236: Revert cl 9528 to fix mac test_shell_tests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/disk_cache/mem_entry_impl.h ('k') | net/disk_cache/stress_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/disk_cache/mem_entry_impl.cc
===================================================================
--- net/disk_cache/mem_entry_impl.cc (revision 9528)
+++ net/disk_cache/mem_entry_impl.cc (working copy)
@@ -4,7 +4,6 @@
#include "net/disk_cache/mem_entry_impl.h"
-#include "net/base/io_buffer.h"
#include "net/base/net_errors.h"
#include "net/disk_cache/mem_backend_impl.h"
@@ -83,8 +82,8 @@
return data_size_[index];
}
-int MemEntryImpl::ReadData(int index, int offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* completion_callback) {
+int MemEntryImpl::ReadData(int index, int offset, char* buf, int buf_len,
+ net::CompletionCallback* completion_callback) {
if (index < 0 || index >= NUM_STREAMS)
return net::ERR_INVALID_ARGUMENT;
@@ -100,12 +99,13 @@
UpdateRank(false);
- memcpy(buf->data() , &(data_[index])[offset], buf_len);
+ memcpy(buf , &(data_[index])[offset], buf_len);
return buf_len;
}
-int MemEntryImpl::WriteData(int index, int offset, net::IOBuffer* buf,
- int buf_len, net::CompletionCallback* completion_callback, bool truncate) {
+int MemEntryImpl::WriteData(int index, int offset, const char* buf, int buf_len,
+ net::CompletionCallback* completion_callback,
+ bool truncate) {
if (index < 0 || index >= NUM_STREAMS)
return net::ERR_INVALID_ARGUMENT;
@@ -143,7 +143,7 @@
if (!buf_len)
return 0;
- memcpy(&(data_[index])[offset], buf->data(), buf_len);
+ memcpy(&(data_[index])[offset], buf, buf_len);
return buf_len;
}
« no previous file with comments | « net/disk_cache/mem_entry_impl.h ('k') | net/disk_cache/stress_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698