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

Unified Diff: tool/input_sdk/lib/io/service_object.dart

Issue 1976103003: Migrate dart2js stubs for dart:io (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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 | « tool/input_sdk/lib/io/security_context.dart ('k') | tool/input_sdk/lib/io/socket.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/io/service_object.dart
diff --git a/tool/input_sdk/lib/io/service_object.dart b/tool/input_sdk/lib/io/service_object.dart
new file mode 100644
index 0000000000000000000000000000000000000000..43bd6512b5fe395371fc17f427d3a7062f599ba6
--- /dev/null
+++ b/tool/input_sdk/lib/io/service_object.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.io;
+
+int _nextServiceId = 1;
+
+// TODO(ajohnsen): Use other way of getting a uniq id.
+abstract class _ServiceObject {
+ int __serviceId = 0;
+ int get _serviceId {
+ if (__serviceId == 0) __serviceId = _nextServiceId++;
+ return __serviceId;
+ }
+
+ Map _toJSON(bool ref);
+
+ String get _servicePath => "$_serviceTypePath/$_serviceId";
+
+ String get _serviceTypePath;
+
+ String get _serviceTypeName;
+
+ String _serviceType(bool ref) {
+ if (ref) return "@$_serviceTypeName";
+ return _serviceTypeName;
+ }
+}
« no previous file with comments | « tool/input_sdk/lib/io/security_context.dart ('k') | tool/input_sdk/lib/io/socket.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698