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: content/app/android/library_loader_hooks.cc

Issue 59533009: Check library version and handle library load errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Answer review comments Created 7 years, 1 month 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
Index: content/app/android/library_loader_hooks.cc
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc
index a42474879c6893ec3486ff22f504fc4ae3eef176..e1d25d009762a7cca0bd1215a4372ef92a84a1ba 100644
--- a/content/app/android/library_loader_hooks.cc
+++ b/content/app/android/library_loader_hooks.cc
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <string.h>
Yaron 2013/11/16 00:10:26 Nit: should go after the header include for this f
Yaron 2013/11/18 19:07:59 bump
+
#include "content/public/app/android_library_loader_hooks.h"
#include "base/android/base_jni_registrar.h"
@@ -36,6 +38,7 @@ namespace content {
namespace {
base::AtExitManager* g_at_exit_manager = NULL;
+const char * g_library_version_number = "";
Yaron 2013/11/16 00:10:26 nit: unnecessary space
aberent 2013/11/18 15:11:37 Done.
}
bool EnsureJniRegistered(JNIEnv* env) {
@@ -146,4 +149,12 @@ bool RegisterLibraryLoaderEntryHook(JNIEnv* env) {
return RegisterNativesImpl(env);
}
+void SetVersionNumber(const char* version_number) {
+ g_library_version_number = strdup(version_number);
+}
+
+jstring GetVersionNumber(JNIEnv* env, jclass clazz) {
+ return env->NewStringUTF(g_library_version_number);
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698