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

Side by Side Diff: base/file_util_proxy.h

Issue 3717001: Make sure we close the file_handle when we create (but not open) a new file (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: changed the flag name Created 10 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 | « no previous file | base/file_util_proxy.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef BASE_FILE_UTIL_PROXY_H_ 5 #ifndef BASE_FILE_UTIL_PROXY_H_
6 #define BASE_FILE_UTIL_PROXY_H_ 6 #define BASE_FILE_UTIL_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 30 matching lines...) Expand all
41 // Creates or opens a file with the given flags. It is invalid to pass NULL 41 // Creates or opens a file with the given flags. It is invalid to pass NULL
42 // for the callback. 42 // for the callback.
43 typedef Callback3<base::PlatformFileError /* error code */, 43 typedef Callback3<base::PlatformFileError /* error code */,
44 base::PassPlatformFile, 44 base::PassPlatformFile,
45 bool /* created */>::Type CreateOrOpenCallback; 45 bool /* created */>::Type CreateOrOpenCallback;
46 static bool CreateOrOpen(scoped_refptr<MessageLoopProxy> message_loop_proxy, 46 static bool CreateOrOpen(scoped_refptr<MessageLoopProxy> message_loop_proxy,
47 const FilePath& file_path, 47 const FilePath& file_path,
48 int file_flags, 48 int file_flags,
49 CreateOrOpenCallback* callback); 49 CreateOrOpenCallback* callback);
50 50
51 // Creates a file with the given flags. This one is a variation of
52 // CreateOrOpen but it doesn't return a file handle.
brettw 2010/10/13 22:48:32 Sorry I didn't look at this before it was checked
kinuko 2010/10/13 23:01:28 I see the point, sorry for bringing the confusing
53 static bool Create(scoped_refptr<MessageLoopProxy> message_loop_proxy,
54 const FilePath& file_path,
55 int file_flags,
56 CreateOrOpenCallback* callback);
57
51 // Creates a temporary file for writing. The path and an open file handle 58 // Creates a temporary file for writing. The path and an open file handle
52 // are returned. It is invalid to pass NULL for the callback. 59 // are returned. It is invalid to pass NULL for the callback.
53 typedef Callback3<base::PlatformFileError /* error code */, 60 typedef Callback3<base::PlatformFileError /* error code */,
54 base::PassPlatformFile, 61 base::PassPlatformFile,
55 FilePath>::Type CreateTemporaryCallback; 62 FilePath>::Type CreateTemporaryCallback;
56 static bool CreateTemporary( 63 static bool CreateTemporary(
57 scoped_refptr<MessageLoopProxy> message_loop_proxy, 64 scoped_refptr<MessageLoopProxy> message_loop_proxy,
58 CreateTemporaryCallback* callback); 65 CreateTemporaryCallback* callback);
59 66
60 // Close the given file handle. 67 // Close the given file handle.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 base::PlatformFile file, 197 base::PlatformFile file,
191 StatusCallback* callback); 198 StatusCallback* callback);
192 199
193 private: 200 private:
194 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy); 201 DISALLOW_IMPLICIT_CONSTRUCTORS(FileUtilProxy);
195 }; 202 };
196 203
197 } // namespace base 204 } // namespace base
198 205
199 #endif // BASE_FILE_UTIL_PROXY_H_ 206 #endif // BASE_FILE_UTIL_PROXY_H_
OLDNEW
« no previous file with comments | « no previous file | base/file_util_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698