diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 04:08:41 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-15 04:08:41 +0000 |
commit | 6b230f4db95ebe798a6cec0045322e562065aef5 (patch) | |
tree | fedc9447bfb327132682cdafe95451bf86764bd1 /net/tools | |
parent | 9f5dd1d37b5b0496fc4815f7c0c4b84a9f606985 (diff) | |
download | chromium_src-6b230f4db95ebe798a6cec0045322e562065aef5.zip chromium_src-6b230f4db95ebe798a6cec0045322e562065aef5.tar.gz chromium_src-6b230f4db95ebe798a6cec0045322e562065aef5.tar.bz2 |
net: Split FileStream::Read/Write() into sync and async versions.
Historically, FileStream::Read/Write() used to take NULL for synchronous
operations, but these are replaced with ComplocationCallback(), which
is rather ugly. ReadSync() and WriteSync() which do not take a
CompletionCallback are introduced for synchronous operations.
Having function separate signatures make clients code cleaner,
and easier to catch synchronous operations on wrong threads.
This convention also matches with Open/OpenSync and Close/CloseSync.
BUG=72001
TEST=try bots.
Review URL: https://chromiumcodereview.appspot.com/9365024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122031 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/dump_cache/dump_files.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tools/dump_cache/dump_files.cc b/net/tools/dump_cache/dump_files.cc index f5656b0..51b8c390 100644 --- a/net/tools/dump_cache/dump_files.cc +++ b/net/tools/dump_cache/dump_files.cc @@ -34,7 +34,7 @@ bool ReadHeader(const std::wstring& name, char* header, int header_size) { return false; } - int read = file.Read(header, header_size, net::CompletionCallback()); + int read = file.ReadSync(header, header_size); if (read != header_size) { printf("Unable to read file %ls\n", name.c_str()); return false; |