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

Side by Side Diff: runtime/bin/platform_patch.dart

Issue 2786183003: [dart:io] Reland: Adds Platform.localeName (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/platform_macos.cc ('k') | runtime/bin/platform_unsupported.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 @patch 5 @patch
6 class _Platform { 6 class _Platform {
7 @patch 7 @patch
8 static int _numberOfProcessors() native "Platform_NumberOfProcessors"; 8 static int _numberOfProcessors() native "Platform_NumberOfProcessors";
9 @patch 9 @patch
10 static String _pathSeparator() native "Platform_PathSeparator"; 10 static String _pathSeparator() native "Platform_PathSeparator";
11 @patch 11 @patch
12 static String _operatingSystem() native "Platform_OperatingSystem"; 12 static String _operatingSystem() native "Platform_OperatingSystem";
13 @patch 13 @patch
14 static _localHostname() native "Platform_LocalHostname"; 14 static _localHostname() native "Platform_LocalHostname";
15 @patch 15 @patch
16 static _executable() native "Platform_ExecutableName"; 16 static _executable() native "Platform_ExecutableName";
17 @patch 17 @patch
18 static _resolvedExecutable() native "Platform_ResolvedExecutableName"; 18 static _resolvedExecutable() native "Platform_ResolvedExecutableName";
19 @patch 19 @patch
20 static _environment() native "Platform_Environment"; 20 static _environment() native "Platform_Environment";
21 @patch 21 @patch
22 static List<String> _executableArguments() 22 static List<String> _executableArguments()
23 native "Platform_ExecutableArguments"; 23 native "Platform_ExecutableArguments";
24 @patch 24 @patch
25 static String _version() native "Platform_GetVersion"; 25 static String _version() native "Platform_GetVersion";
26 26
27 @patch 27 @patch
28 static String _localeName() native "Platform_LocaleName";
29
30 @patch
28 static String _packageRoot() => VMLibraryHooks.packageRootString; 31 static String _packageRoot() => VMLibraryHooks.packageRootString;
29 @patch 32 @patch
30 static String _packageConfig() => VMLibraryHooks.packageConfigString; 33 static String _packageConfig() => VMLibraryHooks.packageConfigString;
31 34
32 // This script singleton is written to by the embedder if applicable. 35 // This script singleton is written to by the embedder if applicable.
33 static void set _nativeScript(String path) { 36 static void set _nativeScript(String path) {
34 if (path.startsWith('http:') || 37 if (path.startsWith('http:') ||
35 path.startsWith('https:') || 38 path.startsWith('https:') ||
36 path.startsWith('package:') || 39 path.startsWith('package:') ||
37 path.startsWith('dart:') || 40 path.startsWith('dart:') ||
38 path.startsWith('data:') || 41 path.startsWith('data:') ||
39 path.startsWith('file:')) { 42 path.startsWith('file:')) {
40 script = Uri.parse(path); 43 script = Uri.parse(path);
41 } else { 44 } else {
42 script = Uri.base.resolveUri(new Uri.file(path)); 45 script = Uri.base.resolveUri(new Uri.file(path));
43 } 46 }
44 VMLibraryHooks.platformScript = script; 47 VMLibraryHooks.platformScript = script;
45 } 48 }
46 } 49 }
OLDNEW
« no previous file with comments | « runtime/bin/platform_macos.cc ('k') | runtime/bin/platform_unsupported.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698