Chromium Code Reviews| 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..51ee4b1c02a517f4955290cdb073e8f630ae3788 100644 |
| --- a/chrome/browser/history/android/sqlite_cursor.cc |
| +++ b/chrome/browser/history/android/sqlite_cursor.cc |
| @@ -16,8 +16,7 @@ |
| using base::android::ConvertUTF8ToJavaString; |
| using base::android::GetClass; |
| using base::android::HasClass; |
| -using base::android::HasMethod; |
| -using base::android::GetMethodID; |
| +using base::android::MethodID; |
| using base::android::ScopedJavaLocalRef; |
| using content::BrowserThread; |
| @@ -62,12 +61,14 @@ ScopedJavaLocalRef<jobject> SQLiteCursor::NewJavaSqliteCursor( |
| } |
| ScopedJavaLocalRef<jclass> sclass = GetClass(env, kSQLiteCursorClassPath); |
| - if (!HasMethod(env, sclass, "<init>", "(I)V")) { |
| + jmethodID method_id = MethodID::Get< |
| + MethodID::METHODTYPE_NORMAL, MethodID::EXCEPTIONCHECK_NO>( |
|
joth
2012/10/04 17:59:59
For the non-lazy API I'm ambivalent about switchin
bulach
2012/10/04 18:58:17
well, a few steps back :)
aren't your eyes ignorin
nyquist
2012/10/04 19:05:48
So, I kind of agree with joth that it might be har
|
| + env, sclass.obj(), "<init>", "(I)V"); |
| + if (!method_id) { |
| LOG(ERROR) << "Can not find " << kSQLiteCursorClassPath << " Constructor"; |
| return ScopedJavaLocalRef<jobject>(); |
| } |
| - jmethodID method_id = GetMethodID(env, sclass, "<init>", "(I)V"); |
| SQLiteCursor* cursor = new SQLiteCursor(column_names, statement, service, |
| favicon_service); |
| ScopedJavaLocalRef<jobject> obj(env, |