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

Unified Diff: sdk/lib/io/service_object.dart

Issue 293013008: Add missing files. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « runtime/bin/service_object_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/service_object.dart
diff --git a/sdk/lib/io/service_object.dart b/sdk/lib/io/service_object.dart
new file mode 100644
index 0000000000000000000000000000000000000000..43bd6512b5fe395371fc17f427d3a7062f599ba6
--- /dev/null
+++ b/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 | « runtime/bin/service_object_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698