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

Side by Side Diff: base/platform_file.h

Issue 15861011: Add an "append flag" to base::PlatformFile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary braces Created 7 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
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | base/platform_file_posix.cc » ('J')
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 #ifndef BASE_PLATFORM_FILE_H_ 5 #ifndef BASE_PLATFORM_FILE_H_
6 #define BASE_PLATFORM_FILE_H_ 6 #define BASE_PLATFORM_FILE_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 PLATFORM_FILE_WRITE_ATTRIBUTES = 1 << 13, // Used on Windows only 43 PLATFORM_FILE_WRITE_ATTRIBUTES = 1 << 13, // Used on Windows only
44 PLATFORM_FILE_ENUMERATE = 1 << 14, // May enumerate directory 44 PLATFORM_FILE_ENUMERATE = 1 << 14, // May enumerate directory
45 45
46 PLATFORM_FILE_SHARE_DELETE = 1 << 15, // Used on Windows only 46 PLATFORM_FILE_SHARE_DELETE = 1 << 15, // Used on Windows only
47 47
48 PLATFORM_FILE_TERMINAL_DEVICE = 1 << 16, // Serial port flags 48 PLATFORM_FILE_TERMINAL_DEVICE = 1 << 16, // Serial port flags
49 PLATFORM_FILE_BACKUP_SEMANTICS = 1 << 17, // Used on Windows only 49 PLATFORM_FILE_BACKUP_SEMANTICS = 1 << 17, // Used on Windows only
50 50
51 PLATFORM_FILE_EXECUTE = 1 << 18, // Used on Windows only 51 PLATFORM_FILE_EXECUTE = 1 << 18, // Used on Windows only
52
53 PLATFORM_FILE_APPEND = 1 << 19,
52 }; 54 };
53 55
54 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of 56 // PLATFORM_FILE_ERROR_ACCESS_DENIED is returned when a call fails because of
55 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a 57 // a filesystem restriction. PLATFORM_FILE_ERROR_SECURITY is returned when a
56 // browser policy doesn't allow the operation to be executed. 58 // browser policy doesn't allow the operation to be executed.
57 enum PlatformFileError { 59 enum PlatformFileError {
58 PLATFORM_FILE_OK = 0, 60 PLATFORM_FILE_OK = 0,
59 PLATFORM_FILE_ERROR_FAILED = -1, 61 PLATFORM_FILE_ERROR_FAILED = -1,
60 PLATFORM_FILE_ERROR_IN_USE = -2, 62 PLATFORM_FILE_ERROR_IN_USE = -2,
61 PLATFORM_FILE_ERROR_EXISTS = -3, 63 PLATFORM_FILE_ERROR_EXISTS = -3,
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 return temp; 242 return temp;
241 } 243 }
242 244
243 private: 245 private:
244 PlatformFile* value_; 246 PlatformFile* value_;
245 }; 247 };
246 248
247 } // namespace base 249 } // namespace base
248 250
249 #endif // BASE_PLATFORM_FILE_H_ 251 #endif // BASE_PLATFORM_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | base/platform_file_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698