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

Unified Diff: chrome/browser/android/shortcut_helper.cc

Issue 2388813002: Delete isWebApkInstalled in ShortcutHelper.java to minimize JNI usage. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_helper.cc
diff --git a/chrome/browser/android/shortcut_helper.cc b/chrome/browser/android/shortcut_helper.cc
index e5c087287bc505fc2071687ff8033745eb4f4ad4..dd68f9c0c32c34dd09aa4c23993eaf9a5b466681 100644
--- a/chrome/browser/android/shortcut_helper.cc
+++ b/chrome/browser/android/shortcut_helper.cc
@@ -261,10 +261,7 @@ std::string ShortcutHelper::QueryWebApkPackage(const GURL& url) {
// static
bool ShortcutHelper::IsWebApkInstalled(const GURL& url) {
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> java_url =
- base::android::ConvertUTF8ToJavaString(env, url.spec());
- return Java_ShortcutHelper_isWebApkInstalled(env, java_url);
+ return !QueryWebApkPackage(url).empty();
}
GURL ShortcutHelper::GetScopeFromURL(const GURL& url) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698