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

Unified Diff: base/android/jni_generator/testJarJarRemapping.golden

Issue 115103002: Android: sync up latest JNI generator changes from downstream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adds extra params Created 6 years, 11 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
Index: base/android/jni_generator/testJarJarRemapping.golden
diff --git a/base/android/jni_generator/testJarJarRemapping.golden b/base/android/jni_generator/testJarJarRemapping.golden
index 4b65b65b39e156413e57479302f6fa3dd1d94fe7..26406e4bb5b2104d321920b78ee879b2db90050f 100644
--- a/base/android/jni_generator/testJarJarRemapping.golden
+++ b/base/android/jni_generator/testJarJarRemapping.golden
@@ -1,4 +1,4 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -12,44 +12,42 @@
#include <jni.h>
-#include "base/android/jni_android.h"
-#include "base/android/scoped_java_ref.h"
-#include "base/basictypes.h"
-#include "base/logging.h"
-
-using base::android::ScopedJavaLocalRef;
+#include "base/android/jni_generator/jni_generator_helper.h"
// Step 1: forward declarations.
namespace {
const char kExampleClassPath[] = "com/test/jni_generator/Example";
// Leaking this jclass as we cannot use LazyInstance from some threads.
jclass g_Example_clazz = NULL;
+
} // namespace
-static void Test(JNIEnv* env, jclass clazz,
+static void Test(JNIEnv* env, jclass jcaller,
jobject t);
// Step 2: method stubs.
// Step 3: RegisterNatives.
-static bool RegisterNativesImpl(JNIEnv* env) {
-
- g_Example_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kExampleClassPath).obj()));
- static const JNINativeMethod kMethodsExample[] = {
+static const JNINativeMethod kMethodsExample[] = {
{ "nativeTest",
"("
"Lorg/test2/org/chromium/example2/Test;"
")"
"V", reinterpret_cast<void*>(Test) },
- };
+};
+
+static bool RegisterNativesImpl(JNIEnv* env) {
+ g_Example_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
+ base::android::GetClass(env, kExampleClassPath).obj()));
+
const int kMethodsExampleSize = arraysize(kMethodsExample);
if (env->RegisterNatives(g_Example_clazz,
kMethodsExample,
kMethodsExampleSize) < 0) {
- LOG(ERROR) << "RegisterNatives failed in " << __FILE__;
+ jni_generator::HandleRegistrationError(
+ env, g_Example_clazz, __FILE__);
return false;
}
« no previous file with comments | « base/android/jni_generator/testJNIInitNativeNameOption.golden ('k') | base/android/jni_generator/testNatives.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698