1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 package org.chromium.chrome.browser;
8 * TODO(nileshagrawal): Rename this class to something more appropriate.
9 * Provides a way for java code to determine whether Chrome was built as an official build.
11 public class BrowserVersion {
13 * Check if the browser was built as an "official" build.
15 public static boolean isOfficialBuild() {
16 return nativeIsOfficialBuild();
20 * Only native code can see the OFFICIAL_BUILD flag; check it from there. This function is
21 * not handled by initialize() and is not available early in startup (before the native
22 * library has loaded). Calling it before that point will result in an exception.
24 private static native boolean nativeIsOfficialBuild();
27 * Get the HTML for the terms of service to be displayed at first run.
29 public static String getTermsOfServiceHtml() {
30 return nativeGetTermsOfServiceHtml();
34 * The terms of service are a native resource.
36 private static native String nativeGetTermsOfServiceHtml();