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

Unified Diff: content/app/android/library_loader_hooks.cc

Issue 2316183002: Remove @MainDex from classes within content/browser (Closed)
Patch Set: Back to PS3 Created 4 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: content/app/android/library_loader_hooks.cc
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc
index 9b441d9fe95f3f9dbfb2a7b5f52db1845b77f2f2..7a99f82e3395e9baf8d9b93f40a9f1baf9021499 100644
--- a/content/app/android/library_loader_hooks.cc
+++ b/content/app/android/library_loader_hooks.cc
@@ -9,6 +9,7 @@
#include "base/android/jni_android.h"
#include "base/android/jni_registrar.h"
#include "base/android/jni_string.h"
+#include "base/android/library_loader/library_loader_hooks.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
@@ -67,8 +68,11 @@ bool EnsureJniRegistered(JNIEnv* env) {
if (!content::android::RegisterCommonJni(env))
return false;
- if (!content::android::RegisterBrowserJni(env))
- return false;
+ if (base::android::GetLibraryProcessType(env) ==
+ base::android::PROCESS_BROWSER) {
Torne 2016/09/12 13:10:13 There's four values for process type, not just two
michaelbai 2016/09/12 18:54:36 The four process types defined in https://cs.chrom
agrieve 2016/09/12 19:22:22 Is it accurate that JNI registration isn't require
michaelbai 2016/09/12 19:25:27 No, as Chrome.apk and ChromeModern.apk still use c
+ if (!content::android::RegisterBrowserJni(env))
+ return false;
+ }
if (!content::android::RegisterAppJni(env))
return false;

Powered by Google App Engine
This is Rietveld 408576698