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

Side by Side Diff: base/platform_file.h

Issue 6646036: wstring: remove wstring method from PlatformFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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/platform_file_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 base::Time creation_time; 93 base::Time creation_time;
94 }; 94 };
95 95
96 // Creates or opens the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and 96 // Creates or opens the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and
97 // |created| is provided, |created| will be set to true if the file was created 97 // |created| is provided, |created| will be set to true if the file was created
98 // or to false in case the file was just opened. |error_code| can be NULL. 98 // or to false in case the file was just opened. |error_code| can be NULL.
99 PlatformFile CreatePlatformFile(const FilePath& name, 99 PlatformFile CreatePlatformFile(const FilePath& name,
100 int flags, 100 int flags,
101 bool* created, 101 bool* created,
102 PlatformFileError* error_code); 102 PlatformFileError* error_code);
103 // Deprecated.
104 PlatformFile CreatePlatformFile(const std::wstring& name,
105 int flags,
106 bool* created);
107 103
108 // Closes a file handle. Returns |true| on success and |false| otherwise. 104 // Closes a file handle. Returns |true| on success and |false| otherwise.
109 bool ClosePlatformFile(PlatformFile file); 105 bool ClosePlatformFile(PlatformFile file);
110 106
111 // Reads the given number of bytes (or until EOF is reached) starting with the 107 // Reads the given number of bytes (or until EOF is reached) starting with the
112 // given offset. Returns the number of bytes read, or -1 on error. 108 // given offset. Returns the number of bytes read, or -1 on error.
113 int ReadPlatformFile(PlatformFile file, int64 offset, char* data, int size); 109 int ReadPlatformFile(PlatformFile file, int64 offset, char* data, int size);
114 110
115 // Writes the given buffer into the file at the given offset, overwritting any 111 // Writes the given buffer into the file at the given offset, overwritting any
116 // data that was previously there. Returns the number of bytes written, or -1 112 // data that was previously there. Returns the number of bytes written, or -1
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 return temp; 163 return temp;
168 } 164 }
169 165
170 private: 166 private:
171 PlatformFile* value_; 167 PlatformFile* value_;
172 }; 168 };
173 169
174 } // namespace base 170 } // namespace base
175 171
176 #endif // BASE_PLATFORM_FILE_H_ 172 #endif // BASE_PLATFORM_FILE_H_
OLDNEW
« no previous file with comments | « no previous file | base/platform_file_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698