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..174c9204349b71ec6ae79e861a488c1463417775 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::GetMethodIDOrNULL; |
|
Sami
2012/10/01 15:46:00
Looks like NULL is still upper case here.
bulach
2012/10/01 17:25:00
Done.
|
| using base::android::ScopedJavaLocalRef; |
| using content::BrowserThread; |
| @@ -62,12 +61,13 @@ ScopedJavaLocalRef<jobject> SQLiteCursor::NewJavaSqliteCursor( |
| } |
| ScopedJavaLocalRef<jclass> sclass = GetClass(env, kSQLiteCursorClassPath); |
| - if (!HasMethod(env, sclass, "<init>", "(I)V")) { |
| + |
| + jmethodID method_id = GetMethodIDOrNULL(env, sclass, "<init>", "(I)V"); |
| + if (!method_id) { |
|
joth
2012/10/01 16:15:27
can we comment why it's OK for this not to exist (
bulach
2012/10/01 17:25:00
ugh, good point.. I think it's one of those "just
|
| 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, |