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

Unified Diff: runtime/bin/file_system_watcher_android.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.cc ('k') | runtime/bin/file_system_watcher_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_android.cc
diff --git a/runtime/bin/file_system_watcher_android.cc b/runtime/bin/file_system_watcher_android.cc
index abece4c0a752007986796d6642515d103803f16c..561c0d42e86192a39a8ae79c88987c7286113570 100644
--- a/runtime/bin/file_system_watcher_android.cc
+++ b/runtime/bin/file_system_watcher_android.cc
@@ -22,7 +22,6 @@ bool FileSystemWatcher::IsSupported() {
return true;
}
-
intptr_t FileSystemWatcher::Init() {
int id = NO_RETRY_EXPECTED(inotify_init());
if (id < 0 || !FDUtils::SetCloseOnExec(id)) {
@@ -35,12 +34,10 @@ intptr_t FileSystemWatcher::Init() {
return id;
}
-
void FileSystemWatcher::Close(intptr_t id) {
USE(id);
}
-
intptr_t FileSystemWatcher::WatchPath(intptr_t id,
const char* path,
int events,
@@ -65,18 +62,15 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
return path_id;
}
-
void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
VOID_NO_RETRY_EXPECTED(inotify_rm_watch(id, path_id));
}
-
intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
USE(path_id);
return id;
}
-
static int InotifyEventToMask(struct inotify_event* e) {
int mask = 0;
if ((e->mask & IN_CLOSE_WRITE) != 0) {
@@ -103,7 +97,6 @@ static int InotifyEventToMask(struct inotify_event* e) {
return mask;
}
-
Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
USE(path_id);
const intptr_t kEventSize = sizeof(struct inotify_event);
@@ -126,9 +119,10 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
Dart_ListSetAt(event, 0, Dart_NewInteger(mask));
Dart_ListSetAt(event, 1, Dart_NewInteger(e->cookie));
if (e->len > 0) {
- Dart_ListSetAt(event, 2, Dart_NewStringFromUTF8(
- reinterpret_cast<uint8_t*>(e->name),
- strlen(e->name)));
+ Dart_ListSetAt(
+ event, 2,
+ Dart_NewStringFromUTF8(reinterpret_cast<uint8_t*>(e->name),
+ strlen(e->name)));
} else {
Dart_ListSetAt(event, 2, Dart_Null());
}
« no previous file with comments | « runtime/bin/file_system_watcher.cc ('k') | runtime/bin/file_system_watcher_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698