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

Unified Diff: base/android/java_system.h

Issue 1283543003: [Android] Add a java.lang.System wrapper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years, 4 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 | « base/android/base_jni_registrar.cc ('k') | base/android/java_system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/android/java_system.h
diff --git a/base/android/java_system.h b/base/android/java_system.h
new file mode 100644
index 0000000000000000000000000000000000000000..bab7257b215b7c27c6e113da1cdb15fe8b233cf5
--- /dev/null
+++ b/base/android/java_system.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BASE_ANDROID_JAVA_SYSTEM_H_
+#define BASE_ANDROID_JAVA_SYSTEM_H_
+
+#include <string>
+
+#include "base/android/jni_android.h"
+#include "base/base_export.h"
+#include "base/strings/string_piece.h"
+
+namespace base {
+namespace android {
+
+// Wrapper class for using the java.lang.System object from jni.
+class BASE_EXPORT JavaSystem {
+ public:
+ // Registers the jni class (once per process).
+ static bool Register(JNIEnv* env);
+
+ // See java.lang.System.getProperty().
+ static std::string GetProperty(const base::StringPiece& stroperty_name);
+};
+
+} // namespace android
+} // namespace base
+
+#endif // BASE_ANDROID_JAVA_SYSTEM_H_
« no previous file with comments | « base/android/base_jni_registrar.cc ('k') | base/android/java_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698