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

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

Issue 59533009: Check library version and handle library load errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BrowserStartupControllerTest Created 7 years, 1 month 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: 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 dd7d46f89e0a4bf600df28d709ba2f230e531c95..de84812775dc1f6f32feb420e13fd61408930ec7 100644
--- a/chrome/app/android/chrome_android_initializer.cc
+++ b/chrome/app/android/chrome_android_initializer.cc
@@ -7,6 +7,7 @@
#include "base/android/jni_android.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"
#include "net/proxy/proxy_resolver_v8.h"
@@ -17,6 +18,11 @@ jint RunChrome(JavaVM* vm, ChromeMainDelegateAndroid* main_delegate) {
if (!content::RegisterLibraryLoaderEntryHook(env))
return -1;
+ // Pass the library version number to content so that we can check it from the
+ // Java side before continuing initialization
+ chrome::VersionInfo vi;
+ content::SetVersionNumber(vi.Version().c_str());
+
DCHECK(main_delegate);
content::SetContentMainDelegate(main_delegate);

Powered by Google App Engine
This is Rietveld 408576698