Commit 21d3160f authored by Robbie McElrath's avatar Robbie McElrath Committed by Commit Bot

Revert "Don't include JNI headers in chrome android when they're not used."

This reverts commit 362070db.

Reason for revert: This probably broke monochrome-feedless-builder

Original change's description:
> Don't include JNI headers in chrome android when they're not used.
> 
> This CL removes dependencies on JNI headers when they're not used and
> the Java implementation isn't included. This makes chrome_public_apk
> work with crrev.com/c/1743088.
> 
> Bug: 836335
> Change-Id: Iec02f4fec9cf93183949547960e191e675e62ebf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746641
> Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Changwan Ryu <changwan@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#694921}

TBR=changwan@chromium.org,agrieve@chromium.org,rmcelrath@chromium.org

Change-Id: I21c2f41e2772f74c1081bf72af96fea9c37d5502
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 836335
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1794022Reviewed-by: default avatarRobbie McElrath <rmcelrath@chromium.org>
Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
Cr-Commit-Position: refs/heads/master@{#694972}
parent 3ea285da
...@@ -392,7 +392,6 @@ source_set("webview_entry_point") { ...@@ -392,7 +392,6 @@ source_set("webview_entry_point") {
shared_library("libwebviewchromium") { shared_library("libwebviewchromium") {
deps = [ deps = [
":webview_entry_point", ":webview_entry_point",
"//components/about_ui:about_ui_android",
] ]
configs -= [ "//build/config/android:hide_all_but_jni_onload" ] configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
configs += [ "//build/config/android:hide_all_but_jni" ] configs += [ "//build/config/android:hide_all_but_jni" ]
......
...@@ -542,17 +542,13 @@ java_group("chrome_all_java") { ...@@ -542,17 +542,13 @@ java_group("chrome_all_java") {
group("jni_headers") { group("jni_headers") {
public_deps = [ public_deps = [
":chrome_jni_headers", ":chrome_jni_headers",
"//chrome/android/features/autofill_assistant:jni_headers",
"//chrome/android/features/keyboard_accessory:jni_headers", "//chrome/android/features/keyboard_accessory:jni_headers",
"//chrome/android/features/media_router:jni_headers", "//chrome/android/features/media_router:jni_headers",
"//chrome/android/public/profiles:jni_headers", "//chrome/android/public/profiles:jni_headers",
"//chrome/lib/image_fetcher/public/android:jni_headers", "//chrome/lib/image_fetcher/public/android:jni_headers",
"//chrome/lib/util/public/android:jni_headers", "//chrome/lib/util/public/android:jni_headers",
] ]
if (disable_autofill_assistant_dfm) {
public_deps +=
[ "//chrome/android/features/autofill_assistant:jni_headers" ]
}
} }
android_library("bundle_canary_java") { android_library("bundle_canary_java") {
...@@ -1456,7 +1452,6 @@ template("libmonochrome_apk_or_bundle_tmpl") { ...@@ -1456,7 +1452,6 @@ template("libmonochrome_apk_or_bundle_tmpl") {
] ]
deps = [ deps = [
"//android_webview:common", "//android_webview:common",
"//components/about_ui:about_ui_android",
"//components/crash/android:crashpad_main", "//components/crash/android:crashpad_main",
] ]
...@@ -2464,6 +2459,7 @@ generate_jni("chrome_jni_headers") { ...@@ -2464,6 +2459,7 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java", "java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointFetcher.java",
"java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java", "java/src/org/chromium/chrome/browser/complex_tasks/endpoint_fetcher/EndpointResponse.java",
"java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java", "java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java",
"java/src/org/chromium/chrome/browser/component_updater/VrAssetsComponentInstaller.java",
"java/src/org/chromium/chrome/browser/compositor/CompositorView.java", "java/src/org/chromium/chrome/browser/compositor/CompositorView.java",
"java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java", "java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java",
"java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java", "java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelContent.java",
...@@ -2730,8 +2726,4 @@ generate_jni("chrome_jni_headers") { ...@@ -2730,8 +2726,4 @@ generate_jni("chrome_jni_headers") {
"feed/core/java/src/org/chromium/chrome/browser/feed/FeedSchedulerBridge.java", "feed/core/java/src/org/chromium/chrome/browser/feed/FeedSchedulerBridge.java",
] ]
} }
if (enable_vr) {
sources += [ "java/src/org/chromium/chrome/browser/component_updater/VrAssetsComponentInstaller.java" ]
}
} }
...@@ -13,17 +13,8 @@ static_library("about_ui") { ...@@ -13,17 +13,8 @@ static_library("about_ui") {
"//ui/base", "//ui/base",
"//ui/resources", "//ui/resources",
] ]
}
if (is_android) { if (is_android) {
static_library("about_ui_android") { deps += [ "//components/about_ui/android:about_ui_jni_headers" ]
sources = [
"credit_utils_android.cc",
]
deps = [
":about_ui",
"//base",
"//components/about_ui/android:about_ui_jni_headers",
]
} }
} }
...@@ -10,6 +10,11 @@ ...@@ -10,6 +10,11 @@
#include "components/grit/components_resources.h" #include "components/grit/components_resources.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#if defined(OS_ANDROID)
#include "base/files/file.h"
#include "components/about_ui/android/about_ui_jni_headers/CreditUtils_jni.h"
#endif
namespace about_ui { namespace about_ui {
std::string GetCredits(bool include_scripts) { std::string GetCredits(bool include_scripts) {
...@@ -25,4 +30,12 @@ std::string GetCredits(bool include_scripts) { ...@@ -25,4 +30,12 @@ std::string GetCredits(bool include_scripts) {
return response; return response;
} }
#if defined(OS_ANDROID)
static void JNI_CreditUtils_WriteCreditsHtml(JNIEnv* env, jint fd) {
std::string html_content = GetCredits(false);
base::File out_file(fd);
out_file.WriteAtCurrentPos(html_content.c_str(), html_content.size());
}
#endif
} // namespace about_ui } // namespace about_ui
// Copyright 2019 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 "components/about_ui/credit_utils.h"
#include "base/files/file.h"
#include "components/about_ui/android/about_ui_jni_headers/CreditUtils_jni.h"
namespace about_ui {
static void JNI_CreditUtils_WriteCreditsHtml(JNIEnv* env, jint fd) {
std::string html_content = GetCredits(false);
base::File out_file(fd);
out_file.WriteAtCurrentPos(html_content.c_str(), html_content.size());
}
} // namespace about_ui
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment