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

Side by Side Diff: runtime/bin/file_fuchsia.cc

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/file_android.cc ('k') | runtime/bin/file_linux.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_FUCHSIA) 6 #if defined(TARGET_OS_FUCHSIA)
7 7
8 #include "bin/file.h" 8 #include "bin/file.h"
9 9
10 #include <errno.h> // NOLINT 10 #include <errno.h> // NOLINT
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 intptr_t File::GetFD() { 68 intptr_t File::GetFD() {
69 return handle_->fd(); 69 return handle_->fd();
70 } 70 }
71 71
72 72
73 bool File::IsClosed() { 73 bool File::IsClosed() {
74 return handle_->fd() == kClosedFd; 74 return handle_->fd() == kClosedFd;
75 } 75 }
76 76
77 77
78 void* File::Map(MapType type, int64_t position, int64_t length) { 78 void* File::MapExecutable(intptr_t* len) {
79 UNIMPLEMENTED(); 79 UNIMPLEMENTED();
80 return NULL; 80 return NULL;
81 } 81 }
82
83
84 void* File::MapReadExecute(int64_t position, int64_t length) {
85 UNIMPLEMENTED();
86 return NULL;
87 }
88 82
89 83
90 int64_t File::Read(void* buffer, int64_t num_bytes) { 84 int64_t File::Read(void* buffer, int64_t num_bytes) {
91 ASSERT(handle_->fd() >= 0); 85 ASSERT(handle_->fd() >= 0);
92 return NO_RETRY_EXPECTED(read(handle_->fd(), buffer, num_bytes)); 86 return NO_RETRY_EXPECTED(read(handle_->fd(), buffer, num_bytes));
93 } 87 }
94 88
95 89
96 int64_t File::Write(const void* buffer, int64_t num_bytes) { 90 int64_t File::Write(const void* buffer, int64_t num_bytes) {
97 ASSERT(handle_->fd() >= 0); 91 ASSERT(handle_->fd() >= 0);
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 return ((file_1_info.st_ino == file_2_info.st_ino) && 443 return ((file_1_info.st_ino == file_2_info.st_ino) &&
450 (file_1_info.st_dev == file_2_info.st_dev)) ? 444 (file_1_info.st_dev == file_2_info.st_dev)) ?
451 File::kIdentical : 445 File::kIdentical :
452 File::kDifferent; 446 File::kDifferent;
453 } 447 }
454 448
455 } // namespace bin 449 } // namespace bin
456 } // namespace dart 450 } // namespace dart
457 451
458 #endif // defined(TARGET_OS_FUCHSIA) 452 #endif // defined(TARGET_OS_FUCHSIA)
OLDNEW
« no previous file with comments | « runtime/bin/file_android.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698