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

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

Issue 17406010: Move getters from Options to Platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed Dart_GetType Created 7 years, 6 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 | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/options.dart
diff --git a/sdk/lib/io/options.dart b/sdk/lib/io/options.dart
index 7b483e502d1f25d3ec7297b239dc51e2c641ffd6..08dd1291f1ba434448448dcc207253e6b72e5e4e 100644
--- a/sdk/lib/io/options.dart
+++ b/sdk/lib/io/options.dart
@@ -44,12 +44,17 @@ abstract class Options {
/**
- * Returns the version of the current dart runtime.
+ * Returns the version of the current Dart runtime.
*/
String get version;
}
class _OptionsImpl implements Options {
+ List<String> _arguments = null;
+
+ // This arguments singleton is written to by the embedder if applicable.
+ static List<String> _nativeArguments = const [];
+
List<String> get arguments {
if (_arguments == null) {
// On first access make a copy of the native arguments.
@@ -58,24 +63,7 @@ class _OptionsImpl implements Options {
return _arguments;
}
- String get executable {
- return _nativeExecutable;
- }
-
- String get script {
- return _nativeScript;
- }
-
- external String get version;
-
- List<String> _arguments = null;
-
- // This arguments singleton is written to by the embedder if applicable.
- static List<String> _nativeArguments = const [];
-
- // This executable singleton is written to by the embedder if applicable.
- static String _nativeExecutable = '';
-
- // This script singleton is written to by the embedder if applicable.
- static String _nativeScript = '';
+ String get executable => Platform.executable;
+ String get script => Platform.script;
+ String get version => Platform.version;
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/platform.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698