Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2011 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. | |
| 4 | |
| 5 package org.chromium.chrome.browser; | |
| 6 | |
| 7 /** | |
| 8 * TODO(nileshagrawal): Rename this class to something more appropriate. | |
| 9 * Provides a way for java code to determine whether Clank was built as an offic ial build. | |
|
Yaron
2014/08/20 19:11:48
Chrome
Feng Qian
2014/08/20 21:34:29
Done.
| |
| 10 */ | |
| 11 public class BrowserVersion { | |
| 12 /** | |
| 13 * Check if the browser was built as an "official" build. | |
| 14 */ | |
| 15 public static boolean isOfficialBuild() { | |
| 16 return nativeIsOfficialBuild(); | |
| 17 } | |
| 18 | |
| 19 /** | |
| 20 * Only native code can see the OFFICIAL_BUILD flag; check it from there. T his 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 exce ption. | |
| 23 * | |
| 24 * 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.
| |
| 25 * reflection: http://b/issue?id=5364886 | |
| 26 */ | |
| 27 private static native boolean nativeIsOfficialBuild(); | |
| 28 | |
| 29 /** | |
| 30 * Get the HTML for the terms of service to be displayed at first run. | |
| 31 */ | |
| 32 public static String getTermsOfServiceHtml() { | |
| 33 return nativeGetTermsOfServiceHtml(); | |
| 34 } | |
| 35 | |
| 36 /** | |
| 37 * Get the HTML for the terms of service to be displayed at first run. | |
| 38 */ | |
| 39 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.
| |
| 40 return nativeGetTermsOfServiceString(); | |
| 41 } | |
| 42 | |
| 43 /** | |
| 44 * The terms of service are a native resource. | |
| 45 */ | |
| 46 private static native String nativeGetTermsOfServiceHtml(); | |
| 47 private static native String nativeGetTermsOfServiceString(); | |
| 48 } | |
| OLD | NEW |