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

Side by Side Diff: net/base/file_stream_posix.h

Issue 11030044: Merge 159454 - Flush at the end of local file writing in FileWriter API. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1271/src/
Patch Set: Created 8 years, 2 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.cc ('k') | net/base/file_stream_posix.cc » ('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 // This file implements FileStream for POSIX. 5 // This file implements FileStream for POSIX.
6 6
7 #ifndef NET_BASE_FILE_STREAM_POSIX_H_ 7 #ifndef NET_BASE_FILE_STREAM_POSIX_H_
8 #define NET_BASE_FILE_STREAM_POSIX_H_ 8 #define NET_BASE_FILE_STREAM_POSIX_H_
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 30 matching lines...) Expand all
41 int Seek(Whence whence, int64 offset, 41 int Seek(Whence whence, int64 offset,
42 const Int64CompletionCallback& callback); 42 const Int64CompletionCallback& callback);
43 int64 SeekSync(Whence whence, int64 offset); 43 int64 SeekSync(Whence whence, int64 offset);
44 int64 Available(); 44 int64 Available();
45 int Read(IOBuffer* buf, int buf_len, const CompletionCallback& callback); 45 int Read(IOBuffer* buf, int buf_len, const CompletionCallback& callback);
46 int ReadSync(char* buf, int buf_len); 46 int ReadSync(char* buf, int buf_len);
47 int ReadUntilComplete(char *buf, int buf_len); 47 int ReadUntilComplete(char *buf, int buf_len);
48 int Write(IOBuffer* buf, int buf_len, const CompletionCallback& callback); 48 int Write(IOBuffer* buf, int buf_len, const CompletionCallback& callback);
49 int WriteSync(const char* buf, int buf_len); 49 int WriteSync(const char* buf, int buf_len);
50 int64 Truncate(int64 bytes); 50 int64 Truncate(int64 bytes);
51 int Flush(); 51 int Flush(const CompletionCallback& callback);
52 int FlushSync();
52 void EnableErrorStatistics(); 53 void EnableErrorStatistics();
53 void SetBoundNetLogSource( 54 void SetBoundNetLogSource(
54 const net::BoundNetLog& owner_bound_net_log); 55 const net::BoundNetLog& owner_bound_net_log);
55 base::PlatformFile GetPlatformFileForTesting(); 56 base::PlatformFile GetPlatformFileForTesting();
56 57
57 // Resets on_io_complete_ and WeakPtr's. 58 // Resets on_io_complete_ and WeakPtr's.
58 // Called when Read() or Write() is completed. 59 // Called when Read() or Write() is completed.
59 void ResetOnIOComplete(); 60 void ResetOnIOComplete();
60 61
61 private: 62 private:
(...skipping 11 matching lines...) Expand all
73 net::BoundNetLog bound_net_log_; 74 net::BoundNetLog bound_net_log_;
74 base::WeakPtrFactory<FileStreamPosix> weak_ptr_factory_; 75 base::WeakPtrFactory<FileStreamPosix> weak_ptr_factory_;
75 scoped_ptr<base::WaitableEvent> on_io_complete_; 76 scoped_ptr<base::WaitableEvent> on_io_complete_;
76 77
77 DISALLOW_COPY_AND_ASSIGN(FileStreamPosix); 78 DISALLOW_COPY_AND_ASSIGN(FileStreamPosix);
78 }; 79 };
79 80
80 } // namespace net 81 } // namespace net
81 82
82 #endif // NET_BASE_FILE_STREAM_POSIX_H 83 #endif // NET_BASE_FILE_STREAM_POSIX_H
OLDNEW
« no previous file with comments | « net/base/file_stream.cc ('k') | net/base/file_stream_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698