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

Side by Side Diff: base/platform_file.h

Issue 3212002: Changes for browser-side implementation for file api.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "build/build_config.h" 9 #include "build/build_config.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 enum PlatformFileError { 44 enum PlatformFileError {
45 PLATFORM_FILE_OK = 0, 45 PLATFORM_FILE_OK = 0,
46 PLATFORM_FILE_ERROR_FAILED = -1, 46 PLATFORM_FILE_ERROR_FAILED = -1,
47 PLATFORM_FILE_ERROR_IN_USE = -2, 47 PLATFORM_FILE_ERROR_IN_USE = -2,
48 PLATFORM_FILE_ERROR_EXISTS = -3, 48 PLATFORM_FILE_ERROR_EXISTS = -3,
49 PLATFORM_FILE_ERROR_NOT_FOUND = -4, 49 PLATFORM_FILE_ERROR_NOT_FOUND = -4,
50 PLATFORM_FILE_ERROR_ACCESS_DENIED = -5, 50 PLATFORM_FILE_ERROR_ACCESS_DENIED = -5,
51 PLATFORM_FILE_ERROR_TOO_MANY_OPENED = -6, 51 PLATFORM_FILE_ERROR_TOO_MANY_OPENED = -6,
52 PLATFORM_FILE_ERROR_NO_MEMORY = -7, 52 PLATFORM_FILE_ERROR_NO_MEMORY = -7,
53 PLATFORM_FILE_ERROR_NO_SPACE = -7, 53 PLATFORM_FILE_ERROR_NO_SPACE = -8,
54 PLATFORM_FILE_ERROR_NOT_A_DIRECTORY = -9 54 PLATFORM_FILE_ERROR_NOT_A_DIRECTORY = -9,
55 PLATFORM_FILE_ERROR_INVALID_OPERATION = -10
55 }; 56 };
56 57
57 // Creates or opens the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and 58 // Creates or opens the given file. If PLATFORM_FILE_OPEN_ALWAYS is used, and
58 // |created| is provided, |created| will be set to true if the file was created 59 // |created| is provided, |created| will be set to true if the file was created
59 // or to false in case the file was just opened. |error_code| can be NULL. 60 // or to false in case the file was just opened. |error_code| can be NULL.
60 PlatformFile CreatePlatformFile(const FilePath& name, 61 PlatformFile CreatePlatformFile(const FilePath& name,
61 int flags, 62 int flags,
62 bool* created, 63 bool* created,
63 PlatformFileError* error_code); 64 PlatformFileError* error_code);
64 // Deprecated. 65 // Deprecated.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return temp; 104 return temp;
104 } 105 }
105 106
106 private: 107 private:
107 PlatformFile* value_; 108 PlatformFile* value_;
108 }; 109 };
109 110
110 } // namespace base 111 } // namespace base
111 112
112 #endif // BASE_PLATFORM_FILE_H_ 113 #endif // BASE_PLATFORM_FILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698