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

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

Issue 2791453002: Revert "[dart:io] 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
31 static String _packageRoot() => VMLibraryHooks.packageRootString; 28 static String _packageRoot() => VMLibraryHooks.packageRootString;
32 @patch 29 @patch
33 static String _packageConfig() => VMLibraryHooks.packageConfigString; 30 static String _packageConfig() => VMLibraryHooks.packageConfigString;
34 31
35 // This script singleton is written to by the embedder if applicable. 32 // This script singleton is written to by the embedder if applicable.
36 static void set _nativeScript(String path) { 33 static void set _nativeScript(String path) {
37 if (path.startsWith('http:') || 34 if (path.startsWith('http:') ||
38 path.startsWith('https:') || 35 path.startsWith('https:') ||
39 path.startsWith('package:') || 36 path.startsWith('package:') ||
40 path.startsWith('dart:') || 37 path.startsWith('dart:') ||
41 path.startsWith('data:') || 38 path.startsWith('data:') ||
42 path.startsWith('file:')) { 39 path.startsWith('file:')) {
43 script = Uri.parse(path); 40 script = Uri.parse(path);
44 } else { 41 } else {
45 script = Uri.base.resolveUri(new Uri.file(path)); 42 script = Uri.base.resolveUri(new Uri.file(path));
46 } 43 }
47 VMLibraryHooks.platformScript = script; 44 VMLibraryHooks.platformScript = script;
48 } 45 }
49 } 46 }
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