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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java

Issue 492843003: [Android] Upstream BrowserVersion.java and related native code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address reviewers' comments Created 6 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 | « no previous file | chrome/browser/android/browser_version.h » ('j') | chrome/browser/android/browser_version.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4c4ecd342c2a4e5167310958e42d1156f064f4a3
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BrowserVersion.java
@@ -0,0 +1,37 @@
+// 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 Chrome was built as an official build.
+ */
+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.
+ */
+ 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();
+ }
+
+ /**
+ * The terms of service are a native resource.
+ */
+ private static native String nativeGetTermsOfServiceHtml();
+}
« no previous file with comments | « no previous file | chrome/browser/android/browser_version.h » ('j') | chrome/browser/android/browser_version.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698