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 * A utility class for querying information about the current Chrome build.
9 * Intentionally doesn't depend on native so that the data can be accessed before
10 * libchrome.so is loaded.
12 public class ChromeVersionInfo {
14 * @return Whether this build is a local build.
16 public static boolean isLocalBuild() {
17 return ChromeVersionConstants.CHANNEL == ChromeVersionConstants.CHANNEL_DEFAULT;
21 * @return Whether this build is a canary build.
23 public static boolean isCanaryBuild() {
24 return ChromeVersionConstants.CHANNEL == ChromeVersionConstants.CHANNEL_CANARY;
28 * @return Whether this build is a dev build.
30 public static boolean isDevBuild() {
31 return ChromeVersionConstants.CHANNEL == ChromeVersionConstants.CHANNEL_DEV;
35 * @return Whether this build is a beta build.
37 public static boolean isBetaBuild() {
38 return ChromeVersionConstants.CHANNEL == ChromeVersionConstants.CHANNEL_BETA;
42 * @return Whether this build is a stable build.
44 public static boolean isStableBuild() {
45 return ChromeVersionConstants.CHANNEL == ChromeVersionConstants.CHANNEL_STABLE;
49 * @return Whether this is an official (i.e. Google Chrome) build.
51 public static boolean isOfficialBuild() {
52 return ChromeVersionConstants.IS_OFFICIAL_BUILD;