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

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

Issue 19263003: Add FileSystemWatcher class to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix android socket. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »
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_WINDOWS) 6 #if defined(TARGET_OS_WINDOWS)
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 #include "bin/eventhandler.h" 9 #include "bin/eventhandler.h"
10 #include "bin/file.h" 10 #include "bin/file.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 Handle* handle = reinterpret_cast<Handle*>(fd); 174 Handle* handle = reinterpret_cast<Handle*>(fd);
175 switch (GetFileType(handle->handle())) { 175 switch (GetFileType(handle->handle())) {
176 case FILE_TYPE_CHAR: return File::kTerminal; 176 case FILE_TYPE_CHAR: return File::kTerminal;
177 case FILE_TYPE_PIPE: return File::kPipe; 177 case FILE_TYPE_PIPE: return File::kPipe;
178 case FILE_TYPE_DISK: return File::kFile; 178 case FILE_TYPE_DISK: return File::kFile;
179 default: return GetLastError == NO_ERROR ? File::kOther : -1; 179 default: return GetLastError == NO_ERROR ? File::kOther : -1;
180 } 180 }
181 } 181 }
182 182
183 183
184 intptr_t Socket::GetStdioHandle(int num) { 184 intptr_t Socket::GetStdioHandle(intptr_t num) {
185 HANDLE handle; 185 HANDLE handle;
186 switch (num) { 186 switch (num) {
187 case 0: 187 case 0:
188 handle = GetStdHandle(STD_INPUT_HANDLE); 188 handle = GetStdHandle(STD_INPUT_HANDLE);
189 break; 189 break;
190 case 1: 190 case 1:
191 handle = GetStdHandle(STD_OUTPUT_HANDLE); 191 handle = GetStdHandle(STD_OUTPUT_HANDLE);
192 break; 192 break;
193 case 2: 193 case 2:
194 handle = GetStdHandle(STD_ERROR_HANDLE); 194 handle = GetStdHandle(STD_ERROR_HANDLE);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 IPPROTO_TCP, 438 IPPROTO_TCP,
439 TCP_NODELAY, 439 TCP_NODELAY,
440 reinterpret_cast<char *>(&on), 440 reinterpret_cast<char *>(&on),
441 sizeof(on)) == 0; 441 sizeof(on)) == 0;
442 } 442 }
443 443
444 } // namespace bin 444 } // namespace bin
445 } // namespace dart 445 } // namespace dart
446 446
447 #endif // defined(TARGET_OS_WINDOWS) 447 #endif // defined(TARGET_OS_WINDOWS)
OLDNEW
« no previous file with comments | « runtime/bin/socket_patch.dart ('k') | sdk/lib/io/directory_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698