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

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 1174343006: Landing https://codereview.chromium.org/1171223003/ for Chinmay. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_macos.cc
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 2e24122b60b619c7a72a3b85d36c509badf9469b..fbecffa5cfb9a1b5886a4d5360c4ca7837c3846d 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -7,6 +7,8 @@
#include "bin/file_system_watcher.h"
+#if !defined(TARGET_OS_IOS)
+
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
#include <unistd.h> // NOLINT
@@ -392,4 +394,44 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
} // namespace bin
} // namespace dart
+#else // !defined(TARGET_OS_IOS)
+
+namespace dart {
+namespace bin {
+
+// FSEvents are unavailable on iOS. Stub out related methods
+Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
+ return DartUtils::NewDartOSError();
+}
+
+intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
+ return -1;
+}
+
+bool FileSystemWatcher::IsSupported() {
+ return false;
+}
+
+void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
+}
+
+intptr_t FileSystemWatcher::Init() {
+ return -1;
+}
+
+void FileSystemWatcher::Close(intptr_t id) {
+}
+
+intptr_t FileSystemWatcher::WatchPath(intptr_t id,
+ const char* path,
+ int events,
+ bool recursive) {
+ return -1;
+}
+
+} // namespace bin
+} // namespace dart
+
+#endif // !defined(TARGET_OS_IOS)
+
#endif // defined(TARGET_OS_MACOS)
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698