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

Unified Diff: runtime/lib/platform_patch.dart

Issue 36883005: Add fields to platform library, implement them on runtime dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add comments. Created 7 years, 2 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
Index: runtime/lib/platform_patch.dart
diff --git a/runtime/lib/platform_patch.dart b/runtime/lib/platform_patch.dart
index 8df6d946c9c5d72ba154d01612807fdee14cbe56..dedbf5dbd245917fd007285b961706e3fd9524fb 100644
--- a/runtime/lib/platform_patch.dart
+++ b/runtime/lib/platform_patch.dart
@@ -2,3 +2,54 @@
// 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.
+patch class _PatchWorkaround {
+ /* patch */ static _Platform get _platform {
+ return _platformHook;
+ }
+}
+
+// A non-default _Platform, with real values, is stored here by the embedder.
+_Platform _platformHook = new _DefaultPlatform();
+
+
+class _DefaultPlatform implements _Platform {
+ int get numberOfProcessors {
+ return null;
+ }
+
+ String get pathSeparator {
+ return "/";
Ivan Posva 2013/10/25 17:03:48 null
Bill Hesse 2013/10/25 17:50:00 Are you ok with making this "/" on Dartium, when a
+ }
+
+ String get operatingSystem {
+ return null;
+ }
+
+ String get localHostname {
+ return null;
+ }
+
+ String get version {
+ return null;
+ }
+
+ Map get environment {
+ return null;
+ }
+
+ String get script {
+ return null;
+ }
+
+ String get executable {
+ return null;
+ }
+
+ List<String> get executableArguments {
+ return new List<String>(0);
+ }
+
+ String get packageRoot {
+ return null;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698