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

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

Issue 7646025: Detect file system errors during downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed namespace for MockFileStream. Created 9 years, 3 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/mock_file_stream.h ('k') | net/net.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "net/base/mock_file_stream.h"
6
7 namespace net {
8
9 namespace testing {
10
11 int MockFileStream::Open(const FilePath& path, int open_flags) {
12 path_ = path;
13 return ReturnError(net::FileStream::Open(path, open_flags));
14 }
15
16 int64 MockFileStream::Seek(net::Whence whence, int64 offset) {
17 return ReturnError64(net::FileStream::Seek(whence, offset));
18 }
19
20 int64 MockFileStream::Available() {
21 return ReturnError64(net::FileStream::Available());
22 }
23
24 int MockFileStream::Read(char* buf,
25 int buf_len,
26 net::CompletionCallback* callback) {
27 return ReturnError(net::FileStream::Read(buf, buf_len, callback));
28 }
29
30 int MockFileStream::ReadUntilComplete(char *buf, int buf_len) {
31 return ReturnError(net::FileStream::ReadUntilComplete(buf, buf_len));
32 }
33
34 int MockFileStream::Write(const char* buf,
35 int buf_len,
36 net::CompletionCallback* callback) {
37 return ReturnError(net::FileStream::Write(buf, buf_len, callback));
38 }
39
40 int64 MockFileStream::Truncate(int64 bytes) {
41 return ReturnError64(net::FileStream::Truncate(bytes));
42 }
43
44 int MockFileStream::Flush() {
45 return ReturnError(net::FileStream::Flush());
46 }
47
48 } // namespace testing
49
50 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mock_file_stream.h ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698