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

Unified Diff: runtime/bin/file_system_watcher_win.cc

Issue 2480793002: clang-format runtime/bin (Closed)
Patch Set: Created 4 years, 1 month 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_unsupported.cc ('k') | runtime/bin/file_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_win.cc
diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc
index ced2cefbb08359f949e5e339528a565aefdd5246..16a49a0ca62a0c72a11d3adfd60597313c90955d 100644
--- a/runtime/bin/file_system_watcher_win.cc
+++ b/runtime/bin/file_system_watcher_win.cc
@@ -41,15 +41,10 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
bool recursive) {
USE(id);
Utf8ToWideScope name(path);
- HANDLE dir = CreateFileW(name.wide(),
- FILE_LIST_DIRECTORY,
- FILE_SHARE_READ |
- FILE_SHARE_WRITE |
- FILE_SHARE_DELETE,
- NULL,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
- NULL);
+ HANDLE dir = CreateFileW(
+ name.wide(), FILE_LIST_DIRECTORY,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, NULL);
if (dir == INVALID_HANDLE_VALUE) {
return -1;
@@ -57,8 +52,7 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
int list_events = 0;
if ((events & (kCreate | kMove | kDelete)) != 0) {
- list_events |= FILE_NOTIFY_CHANGE_FILE_NAME |
- FILE_NOTIFY_CHANGE_DIR_NAME;
+ list_events |= FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME;
}
if ((events & kModifyContent) != 0) {
list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE;
@@ -124,7 +118,8 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
// Move events come in pairs. Just 'enable' by default.
Dart_ListSetAt(event, 1, Dart_NewInteger(1));
Dart_ListSetAt(event, 2, Dart_NewStringFromUTF16(
- reinterpret_cast<uint16_t*>(e->FileName), e->FileNameLength / 2));
+ reinterpret_cast<uint16_t*>(e->FileName),
+ e->FileNameLength / 2));
Dart_ListSetAt(event, 3, Dart_NewBoolean(true));
Dart_ListSetAt(event, 4, Dart_NewInteger(path_id));
Dart_ListSetAt(events, i, event);
« no previous file with comments | « runtime/bin/file_system_watcher_unsupported.cc ('k') | runtime/bin/file_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698