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

Unified Diff: runtime/bin/builtin.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: Address all 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
« no previous file with comments | « no previous file | runtime/bin/dartutils.h » ('j') | sdk/lib/_internal/lib/platform_patch.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 91702ab412621dfa77515676f8fc0b17cfd065dd..93c7a7bee7404473691ec295827ab977fe5aa3e7 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -310,3 +310,23 @@ String _filePathFromHttpUri(Uri uri) {
_logResolution('# Path: $uri -> $uri');
return uri.toString();
}
+
+
+class _PlatformHook {
+ int get numberOfProcessors => Platform.numberOfProcessors;
Ivan Posva 2013/10/25 17:26:44 I am assuming that we will remove the Platform fro
Bill Hesse 2013/10/25 17:50:00 Comment added in CL 43773004.
+ String get pathSeparator => Platform.pathSeparator;
+ String get operatingSystem => Platform.operatingSystem;
+ String get localHostname => Platform.localHostname;
+ String get version => Platform.version;
+ Map<String, String> get environment => Platform.environment;
+ Uri get script => new Uri.file(Platform.script);
+ String get executable => Platform.executable;
+ List<String> get executableArguments => Platform.executableArguments;
+ String get packageRoot => Platform.packageRoot;
+}
+
+
+_getPlatform() => new _PlatformHook();
+
+
+
« no previous file with comments | « no previous file | runtime/bin/dartutils.h » ('j') | sdk/lib/_internal/lib/platform_patch.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698