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

Side by Side Diff: runtime/bin/file.h

Issue 2410303008: Revert "Use a single file for app snapshots." (Closed)
Patch Set: Created 4 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
« no previous file with comments | « runtime/bin/extensions_win.cc ('k') | runtime/bin/file_android.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_FILE_H_ 5 #ifndef BIN_FILE_H_
6 #define BIN_FILE_H_ 6 #define BIN_FILE_H_
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 kLockUnlock = 0, 81 kLockUnlock = 0,
82 kLockShared = 1, 82 kLockShared = 1,
83 kLockExclusive = 2, 83 kLockExclusive = 2,
84 kLockBlockingShared = 3, 84 kLockBlockingShared = 3,
85 kLockBlockingExclusive = 4, 85 kLockBlockingExclusive = 4,
86 kLockMax = 4 86 kLockMax = 4
87 }; 87 };
88 88
89 intptr_t GetFD(); 89 intptr_t GetFD();
90 90
91 enum MapType { 91 void* MapExecutable(intptr_t* num_bytes);
92 kReadOnly = 0,
93 kReadExecute = 1,
94 };
95 void* Map(MapType type, int64_t position, int64_t length);
96 92
97 // Read/Write attempt to transfer num_bytes to/from buffer. It returns 93 // Read/Write attempt to transfer num_bytes to/from buffer. It returns
98 // the number of bytes read/written. 94 // the number of bytes read/written.
99 int64_t Read(void* buffer, int64_t num_bytes); 95 int64_t Read(void* buffer, int64_t num_bytes);
100 int64_t Write(const void* buffer, int64_t num_bytes); 96 int64_t Write(const void* buffer, int64_t num_bytes);
101 97
102 // ReadFully and WriteFully do attempt to transfer num_bytes to/from 98 // ReadFully and WriteFully do attempt to transfer num_bytes to/from
103 // the buffer. In the event of short accesses they will loop internally until 99 // the buffer. In the event of short accesses they will loop internally until
104 // the whole buffer has been transferred or an error occurs. If an error 100 // the whole buffer has been transferred or an error occurs. If an error
105 // occurred the result will be set to false. 101 // occurred the result will be set to false.
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 Dart_WeakPersistentHandle weak_handle_; 234 Dart_WeakPersistentHandle weak_handle_;
239 235
240 friend class ReferenceCounted<File>; 236 friend class ReferenceCounted<File>;
241 DISALLOW_COPY_AND_ASSIGN(File); 237 DISALLOW_COPY_AND_ASSIGN(File);
242 }; 238 };
243 239
244 } // namespace bin 240 } // namespace bin
245 } // namespace dart 241 } // namespace dart
246 242
247 #endif // BIN_FILE_H_ 243 #endif // BIN_FILE_H_
OLDNEW
« no previous file with comments | « runtime/bin/extensions_win.cc ('k') | runtime/bin/file_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698