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

Unified Diff: chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_jni_onload.cc

Issue 2378803003: [Offline Pages] Added OfflinePageEvaluationBridge for testing. (Closed)
Patch Set: Build changed. 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
Index: chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_jni_onload.cc
diff --git a/chrome/app/android/chrome_jni_onload.cc b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_jni_onload.cc
similarity index 60%
copy from chrome/app/android/chrome_jni_onload.cc
copy to chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_jni_onload.cc
index 124e3c2b7f05c18d9462228fddad4d7ba680b511..b8b9324a01f9c7c2878c3a5355e96e2bae1f38f1 100644
--- a/chrome/app/android/chrome_jni_onload.cc
+++ b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_jni_onload.cc
@@ -1,34 +1,30 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/app/android/chrome_jni_onload.h"
+#include "chrome/browser/android/offline_pages/offline_page_evaluation_jni_onload.h"
-#include "base/android/library_loader/library_loader_hooks.h"
+#include "base/android/base_jni_onload.h"
+#include "base/android/base_jni_registrar.h"
#include "base/bind.h"
-#include "chrome/app/android/chrome_android_initializer.h"
-#include "chrome/browser/android/chrome_jni_registrar.h"
-#include "content/public/app/content_jni_onload.h"
+#include "chrome/browser/android/offline_pages/offline_page_evaluation_bridge.h"
-namespace chrome {
+namespace offline_pages {
namespace android {
namespace {
bool RegisterJNI(JNIEnv* env) {
- if (base::android::GetLibraryProcessType(env) ==
- base::android::PROCESS_BROWSER) {
- return RegisterBrowserJNI(env);
- }
- return true;
+ return offline_pages::android::OfflinePageEvaluationBridge::Register(env);
}
bool Init() {
- return RunChrome();
+ return true;
}
} // namespace
+
bool OnJNIOnLoadRegisterJNI(
JavaVM* vm,
base::android::RegisterCallback callback) {
@@ -46,4 +42,4 @@ bool OnJNIOnLoadInit(base::android::InitCallback callback) {
}
} // namespace android
-} // namespace chrome
+} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698