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

Unified Diff: runtime/bin/platform.cc

Issue 3006873002: [dart:io] Adds Platform.operatingSystemVersion (Closed)
Patch Set: Updated CHANGELOG Created 3 years, 3 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 | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform.cc
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index 88a52a26daa444128882d554237641f1add8845a..20c7ff01108782f8c60802b81aaa9bec4ed52253 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -19,6 +19,15 @@ void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem()));
}
+void FUNCTION_NAME(Platform_OperatingSystemVersion)(Dart_NativeArguments args) {
+ const char* version = Platform::OperatingSystemVersion();
+ if (version == NULL) {
+ Dart_SetReturnValue(args, DartUtils::NewDartOSError());
+ } else {
+ Dart_SetReturnValue(args, DartUtils::NewString(version));
+ }
+}
+
void FUNCTION_NAME(Platform_PathSeparator)(Dart_NativeArguments args) {
Dart_SetReturnValue(args, DartUtils::NewString(File::PathSeparator()));
}
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698