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

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

Issue 1388973002: Use #if TARGET_OS_IOS instead of #ifdef TARGET_OS_IOS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comment, rebase. Created 5 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 | « no previous file | runtime/bin/platform_macos.cc » ('j') | runtime/platform/globals.h » ('J')
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 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_MACOS) 6 #if defined(TARGET_OS_MACOS)
7 7
8 #include "bin/file_system_watcher.h" 8 #include "bin/file_system_watcher.h"
9 9
10 #if !defined(TARGET_OS_IOS) 10 #if !TARGET_OS_IOS
11 11
12 #include <errno.h> // NOLINT 12 #include <errno.h> // NOLINT
13 #include <fcntl.h> // NOLINT 13 #include <fcntl.h> // NOLINT
14 #include <unistd.h> // NOLINT 14 #include <unistd.h> // NOLINT
15 #include <CoreServices/CoreServices.h> // NOLINT 15 #include <CoreServices/CoreServices.h> // NOLINT
16 16
17 #include "bin/eventhandler.h" 17 #include "bin/eventhandler.h"
18 #include "bin/fdutils.h" 18 #include "bin/fdutils.h"
19 #include "bin/file.h" 19 #include "bin/file.h"
20 #include "bin/socket.h" 20 #include "bin/socket.h"
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 Dart_ListSetAt(event, 3, Dart_NewBoolean(true)); 387 Dart_ListSetAt(event, 3, Dart_NewBoolean(true));
388 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id)); 388 Dart_ListSetAt(event, 4, Dart_NewInteger(path_id));
389 Dart_ListSetAt(events, i, event); 389 Dart_ListSetAt(events, i, event);
390 } 390 }
391 return events; 391 return events;
392 } 392 }
393 393
394 } // namespace bin 394 } // namespace bin
395 } // namespace dart 395 } // namespace dart
396 396
397 #else // !defined(TARGET_OS_IOS) 397 #else // !TARGET_OS_IOS
398 398
399 namespace dart { 399 namespace dart {
400 namespace bin { 400 namespace bin {
401 401
402 // FSEvents are unavailable on iOS. Stub out related methods 402 // FSEvents are unavailable on iOS. Stub out related methods
403 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) { 403 Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
404 return DartUtils::NewDartOSError(); 404 return DartUtils::NewDartOSError();
405 } 405 }
406 406
407 intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) { 407 intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
(...skipping 17 matching lines...) Expand all
425 intptr_t FileSystemWatcher::WatchPath(intptr_t id, 425 intptr_t FileSystemWatcher::WatchPath(intptr_t id,
426 const char* path, 426 const char* path,
427 int events, 427 int events,
428 bool recursive) { 428 bool recursive) {
429 return -1; 429 return -1;
430 } 430 }
431 431
432 } // namespace bin 432 } // namespace bin
433 } // namespace dart 433 } // namespace dart
434 434
435 #endif // !defined(TARGET_OS_IOS) 435 #endif // !TARGET_OS_IOS
436 436
437 #endif // defined(TARGET_OS_MACOS) 437 #endif // defined(TARGET_OS_MACOS)
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/platform_macos.cc » ('j') | runtime/platform/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698