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

Unified Diff: chrome/app/android/chrome_android_initializer.cc

Issue 864563002: Separate JNI registration with initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments and sync Created 5 years, 11 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/app/android/chrome_android_initializer.h ('k') | chrome/app/android/chrome_jni_onload.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/android/chrome_android_initializer.cc
diff --git a/chrome/app/android/chrome_android_initializer.cc b/chrome/app/android/chrome_android_initializer.cc
index e4d0c2d4307c2cd9993c85aeb30b395cc524b6df..579566e12df02c8386a75db65191ea27dcb0538e 100644
--- a/chrome/app/android/chrome_android_initializer.cc
+++ b/chrome/app/android/chrome_android_initializer.cc
@@ -4,28 +4,17 @@
#include "chrome/app/android/chrome_android_initializer.h"
-#include "base/android/jni_android.h"
#include "base/android/library_loader/library_loader_hooks.h"
-#include "base/logging.h"
#include "chrome/app/android/chrome_main_delegate_android.h"
#include "chrome/common/chrome_version_info.h"
-#include "content/public/app/android_library_loader_hooks.h"
#include "content/public/app/content_main.h"
-jint RunChrome(JavaVM* vm, ChromeMainDelegateAndroid* main_delegate) {
- base::android::InitVM(vm);
- JNIEnv* env = base::android::AttachCurrentThread();
- if (!base::android::RegisterLibraryLoaderEntryHook(env))
- return -1;
-
+bool RunChrome() {
// Pass the library version number to content so that we can check it from the
// Java side before continuing initialization
chrome::VersionInfo vi;
- base::android::SetLibraryLoadedHook(&content::LibraryLoaded);
base::android::SetVersionNumber(vi.Version().c_str());
+ content::SetContentMainDelegate(ChromeMainDelegateAndroid::Create());
- DCHECK(main_delegate);
- content::SetContentMainDelegate(main_delegate);
-
- return JNI_VERSION_1_4;
+ return true;
}
« no previous file with comments | « chrome/app/android/chrome_android_initializer.h ('k') | chrome/app/android/chrome_jni_onload.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698