Index: chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java b/chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..786bf01c850e3def14bf6013442d3d0844568ef0 |
--- /dev/null |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java |
@@ -0,0 +1,48 @@ |
+// Copyright 2011 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. |
+ |
+package org.chromium.chrome.browser; |
+ |
+/** |
+ * TODO(nileshagrawal): Rename this class to something more appropriate. |
+ * Provides a way for java code to determine whether Clank was built as an official build. |
Yaron
2014/08/20 19:11:48
Chrome
Feng Qian
2014/08/20 21:34:29
Done.
|
+ */ |
+public class BrowserVersion { |
+ /** |
+ * Check if the browser was built as an "official" build. |
+ */ |
+ public static boolean isOfficialBuild() { |
+ return nativeIsOfficialBuild(); |
+ } |
+ |
+ /** |
+ * Only native code can see the OFFICIAL_BUILD flag; check it from there. This function is |
+ * not handled by initialize() and is not available early in startup (before the native |
+ * library has loaded). Calling it before that point will result in an exception. |
+ * |
+ * TODO(dfalcantara): If/when we start using ProGuard, replace this JNI call with method |
Yaron
2014/08/20 19:11:48
We do use proguard. What does this mean? It's prob
gone
2014/08/20 20:12:42
joth made me add this TODO forever ago. Probably
Feng Qian
2014/08/20 21:34:29
Done.
|
+ * reflection: http://b/issue?id=5364886 |
+ */ |
+ private static native boolean nativeIsOfficialBuild(); |
+ |
+ /** |
+ * Get the HTML for the terms of service to be displayed at first run. |
+ */ |
+ public static String getTermsOfServiceHtml() { |
+ return nativeGetTermsOfServiceHtml(); |
+ } |
+ |
+ /** |
+ * Get the HTML for the terms of service to be displayed at first run. |
+ */ |
+ public static String getTermsOfServiceString() { |
Yaron
2014/08/20 19:11:48
I don't actually see where this is used. Please re
Feng Qian
2014/08/20 21:34:29
Done.
|
+ return nativeGetTermsOfServiceString(); |
+ } |
+ |
+ /** |
+ * The terms of service are a native resource. |
+ */ |
+ private static native String nativeGetTermsOfServiceHtml(); |
+ private static native String nativeGetTermsOfServiceString(); |
+} |