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

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

Issue 1158923005: Use the exact-width integer types defined in <stdint.h> rather than (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tweak comments. Exclude mime_sniffer*. Rebase. Created 5 years, 6 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
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 #include "base/profiler/scoped_tracker.h" 7 #include "base/profiler/scoped_tracker.h"
8 #include "net/base/file_stream_context.h" 8 #include "net/base/file_stream_context.h"
9 #include "net/base/net_errors.h" 9 #include "net/base/net_errors.h"
10 10
(...skipping 27 matching lines...) Expand all
38 int FileStream::Close(const CompletionCallback& callback) { 38 int FileStream::Close(const CompletionCallback& callback) {
39 context_->Close(callback); 39 context_->Close(callback);
40 return ERR_IO_PENDING; 40 return ERR_IO_PENDING;
41 } 41 }
42 42
43 bool FileStream::IsOpen() const { 43 bool FileStream::IsOpen() const {
44 return context_->file().IsValid(); 44 return context_->file().IsValid();
45 } 45 }
46 46
47 int FileStream::Seek(base::File::Whence whence, 47 int FileStream::Seek(base::File::Whence whence,
48 int64 offset, 48 int64_t offset,
49 const Int64CompletionCallback& callback) { 49 const Int64CompletionCallback& callback) {
50 if (!IsOpen()) 50 if (!IsOpen())
51 return ERR_UNEXPECTED; 51 return ERR_UNEXPECTED;
52 52
53 context_->Seek(whence, offset, callback); 53 context_->Seek(whence, offset, callback);
54 return ERR_IO_PENDING; 54 return ERR_IO_PENDING;
55 } 55 }
56 56
57 int FileStream::Read(IOBuffer* buf, 57 int FileStream::Read(IOBuffer* buf,
58 int buf_len, 58 int buf_len,
(...skipping 27 matching lines...) Expand all
86 86
87 context_->Flush(callback); 87 context_->Flush(callback);
88 return ERR_IO_PENDING; 88 return ERR_IO_PENDING;
89 } 89 }
90 90
91 const base::File& FileStream::GetFileForTesting() const { 91 const base::File& FileStream::GetFileForTesting() const {
92 return context_->file(); 92 return context_->file();
93 } 93 }
94 94
95 } // namespace net 95 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698