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

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 2974233002: VM: Re-format to use at most one newline between functions (Closed)
Patch Set: Rebase and merge Created 3 years, 5 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/file_system_watcher_linux.cc ('k') | runtime/bin/file_system_watcher_unsupported.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 f9da101c095ba7dd10c5fd52cfa9b24efef17555..bb524c0797e887fa59d29a12ac34ae0e274eb01c 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -11,10 +11,10 @@
#if !HOST_OS_IOS
+#include <CoreServices/CoreServices.h> // NOLINT
#include <errno.h> // NOLINT
#include <fcntl.h> // NOLINT
#include <unistd.h> // NOLINT
-#include <CoreServices/CoreServices.h> // NOLINT
#include "bin/eventhandler.h"
#include "bin/fdutils.h"
@@ -52,7 +52,6 @@ union FSEvent {
uint8_t bytes[PATH_MAX + 8];
};
-
class FSEventsWatcher {
public:
class Node {
@@ -177,7 +176,6 @@ class FSEventsWatcher {
DISALLOW_COPY_AND_ASSIGN(Node);
};
-
FSEventsWatcher() : run_loop_(0) { Start(); }
void Start() {
@@ -299,23 +297,19 @@ class FSEventsWatcher {
DISALLOW_COPY_AND_ASSIGN(FSEventsWatcher);
};
-
#define kCFCoreFoundationVersionNumber10_7 635.00
bool FileSystemWatcher::IsSupported() {
return kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_7;
}
-
intptr_t FileSystemWatcher::Init() {
return reinterpret_cast<intptr_t>(new FSEventsWatcher());
}
-
void FileSystemWatcher::Close(intptr_t id) {
delete reinterpret_cast<FSEventsWatcher*>(id);
}
-
intptr_t FileSystemWatcher::WatchPath(intptr_t id,
const char* path,
int events,
@@ -324,18 +318,15 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
return reinterpret_cast<intptr_t>(watcher->AddPath(path, events, recursive));
}
-
void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
USE(id);
delete reinterpret_cast<FSEventsWatcher::Node*>(path_id);
}
-
intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
return reinterpret_cast<FSEventsWatcher::Node*>(path_id)->read_fd();
}
-
Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
intptr_t fd = GetSocketId(id, path_id);
intptr_t avail = FDUtils::AvailableBytes(fd);
@@ -407,28 +398,22 @@ 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,
« no previous file with comments | « runtime/bin/file_system_watcher_linux.cc ('k') | runtime/bin/file_system_watcher_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698