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

Side by Side Diff: base/files/file.h

Issue 1148383003: Only support seeking file streams from the beginning of the file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more instance where files need to be tagged as async. Created 5 years, 7 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/files/file.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 #ifndef BASE_FILES_FILE_H_ 5 #ifndef BASE_FILES_FILE_H_
6 #define BASE_FILES_FILE_H_ 6 #define BASE_FILES_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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 File(); 162 File();
163 163
164 // Creates or opens the given file. This will fail with 'access denied' if the 164 // Creates or opens the given file. This will fail with 'access denied' if the
165 // |path| contains path traversal ('..') components. 165 // |path| contains path traversal ('..') components.
166 File(const FilePath& path, uint32 flags); 166 File(const FilePath& path, uint32 flags);
167 167
168 // Takes ownership of |platform_file|. 168 // Takes ownership of |platform_file|.
169 explicit File(PlatformFile platform_file); 169 explicit File(PlatformFile platform_file);
170 170
171 // Takes ownership of |platform_file| and sets |async|.
172 File(PlatformFile platform_file, bool async);
Lei Zhang 2015/05/25 00:29:58 Calling this with |async| set to false is the same
Reilly Grant (use Gerrit) 2015/05/26 23:41:33 Done.
173
171 // Creates an object with a specific error_details code. 174 // Creates an object with a specific error_details code.
172 explicit File(Error error_details); 175 explicit File(Error error_details);
173 176
174 // Move constructor for C++03 move emulation of this type. 177 // Move constructor for C++03 move emulation of this type.
175 File(RValue other); 178 File(RValue other);
176 179
177 ~File(); 180 ~File();
178 181
179 // Move operator= for C++03 move emulation of this type. 182 // Move operator= for C++03 move emulation of this type.
180 File& operator=(RValue other); 183 File& operator=(RValue other);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 FileTracing::ScopedEnabler trace_enabler_; 378 FileTracing::ScopedEnabler trace_enabler_;
376 379
377 Error error_details_; 380 Error error_details_;
378 bool created_; 381 bool created_;
379 bool async_; 382 bool async_;
380 }; 383 };
381 384
382 } // namespace base 385 } // namespace base
383 386
384 #endif // BASE_FILES_FILE_H_ 387 #endif // BASE_FILES_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | base/files/file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698