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

Side by Side Diff: net/base/file_stream.cc

Issue 9949011: Make FileStream::Seek async and add FileStream::SeekSync for sync operation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/file_stream.h ('k') | net/base/file_stream_posix.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/base/file_stream.h" 5 #include "net/base/file_stream.h"
6 6
7 namespace net { 7 namespace net {
8 8
9 FileStream::FileStream(net::NetLog* net_log) 9 FileStream::FileStream(net::NetLog* net_log)
10 : impl_(net_log) { 10 : impl_(net_log) {
(...skipping 21 matching lines...) Expand all
32 } 32 }
33 33
34 int FileStream::OpenSync(const FilePath& path, int open_flags) { 34 int FileStream::OpenSync(const FilePath& path, int open_flags) {
35 return impl_.OpenSync(path, open_flags); 35 return impl_.OpenSync(path, open_flags);
36 } 36 }
37 37
38 bool FileStream::IsOpen() const { 38 bool FileStream::IsOpen() const {
39 return impl_.IsOpen(); 39 return impl_.IsOpen();
40 } 40 }
41 41
42 int64 FileStream::Seek(Whence whence, int64 offset) { 42 int FileStream::Seek(Whence whence, int64 offset,
43 return impl_.Seek(whence, offset); 43 const Int64CompletionCallback& callback) {
44 return impl_.Seek(whence, offset, callback);
45 }
46
47 int64 FileStream::SeekSync(Whence whence, int64 offset) {
48 return impl_.SeekSync(whence, offset);
44 } 49 }
45 50
46 int64 FileStream::Available() { 51 int64 FileStream::Available() {
47 return impl_.Available(); 52 return impl_.Available();
48 } 53 }
49 54
50 int FileStream::Read( 55 int FileStream::Read(
51 IOBuffer* in_buf, int buf_len, const CompletionCallback& callback) { 56 IOBuffer* in_buf, int buf_len, const CompletionCallback& callback) {
52 return impl_.Read(in_buf, buf_len, callback); 57 return impl_.Read(in_buf, buf_len, callback);
53 } 58 }
(...skipping 30 matching lines...) Expand all
84 void FileStream::SetBoundNetLogSource( 89 void FileStream::SetBoundNetLogSource(
85 const net::BoundNetLog& owner_bound_net_log) { 90 const net::BoundNetLog& owner_bound_net_log) {
86 impl_.SetBoundNetLogSource(owner_bound_net_log); 91 impl_.SetBoundNetLogSource(owner_bound_net_log);
87 } 92 }
88 93
89 base::PlatformFile FileStream::GetPlatformFileForTesting() { 94 base::PlatformFile FileStream::GetPlatformFileForTesting() {
90 return impl_.GetPlatformFileForTesting(); 95 return impl_.GetPlatformFileForTesting();
91 } 96 }
92 97
93 } // namespace net 98 } // namespace net
OLDNEW
« no previous file with comments | « net/base/file_stream.h ('k') | net/base/file_stream_posix.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698