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

Unified Diff: chrome/browser/android/browser_version.cc

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 | « chrome/browser/android/browser_version.h ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/browser_version.cc
diff --git a/chrome/browser/android/browser_version.cc b/chrome/browser/android/browser_version.cc
new file mode 100644
index 0000000000000000000000000000000000000000..fd47c9acffd9ab3614b5d7511dd41b4cb37971fe
--- /dev/null
+++ b/chrome/browser/android/browser_version.cc
@@ -0,0 +1,27 @@
+// 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.
+
+#include "chrome/browser/android/browser_version.h"
+
+#include "base/android/jni_string.h"
+#include "chrome/common/chrome_version_info.h"
+#include "grit/locale_settings.h"
+#include "jni/BrowserVersion_jni.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
Lei Zhang 2014/08/20 21:53:50 nit: not used either.
+
+using base::android::ConvertUTF8ToJavaString;
+
+static jboolean IsOfficialBuild(JNIEnv* env, jclass /* clazz */) {
+ return chrome::VersionInfo().IsOfficialBuild();
+}
+
+static jstring GetTermsOfServiceHtml(JNIEnv* env, jclass /* clazz */) {
+ return ConvertUTF8ToJavaString(env,
+ l10n_util::GetStringUTF8(IDS_TERMS_HTML)).Release();
+}
+
+bool RegisterBrowserVersion(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
« no previous file with comments | « chrome/browser/android/browser_version.h ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698