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

Unified Diff: chrome/browser/history/android/sqlite_cursor.cc

Issue 10996063: Android: adds Get(Static)MethodIDOrNULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sami/Joth comments Created 8 years, 3 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: chrome/browser/history/android/sqlite_cursor.cc
diff --git a/chrome/browser/history/android/sqlite_cursor.cc b/chrome/browser/history/android/sqlite_cursor.cc
index 786e157c7e090978b5666162fbdaaa71adb2b1d2..8de713d8afca09e90866ae74bd637f1edfa18c52 100644
--- a/chrome/browser/history/android/sqlite_cursor.cc
+++ b/chrome/browser/history/android/sqlite_cursor.cc
@@ -16,7 +16,6 @@
using base::android::ConvertUTF8ToJavaString;
using base::android::GetClass;
using base::android::HasClass;
-using base::android::HasMethod;
using base::android::GetMethodID;
using base::android::ScopedJavaLocalRef;
using content::BrowserThread;
@@ -62,12 +61,9 @@ ScopedJavaLocalRef<jobject> SQLiteCursor::NewJavaSqliteCursor(
}
ScopedJavaLocalRef<jclass> sclass = GetClass(env, kSQLiteCursorClassPath);
- if (!HasMethod(env, sclass, "<init>", "(I)V")) {
nyquist 2012/10/02 02:59:17 See RHS of review
bulach 2012/10/02 08:19:22 Done.
- LOG(ERROR) << "Can not find " << kSQLiteCursorClassPath << " Constructor";
- return ScopedJavaLocalRef<jobject>();
- }
jmethodID method_id = GetMethodID(env, sclass, "<init>", "(I)V");
nyquist 2012/10/02 02:59:17 Could we do GetMethodIDOrNull(...) here, and then
bulach 2012/10/02 08:19:22 joth points out that this constructor has always b
+
SQLiteCursor* cursor = new SQLiteCursor(column_names, statement, service,
favicon_service);
ScopedJavaLocalRef<jobject> obj(env,
« base/android/jni_android.cc ('K') | « base/android/jni_generator/jni_generator_tests.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698