New issue
Advanced search Search tips

Issue 732668 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocked on:
issue 739603



Sign in to add a comment

Remove includes to components/ from blink

Project Member Reported by jam@chromium.org, Jun 13 2017

Issue description

Kentaro and I were chatting, and we both believe that having blink include directories from src/components is confusing.

The issue is that most components depend on blink, either directly or indirectly. Most devs think of components as one thing, so having blink include some of it is unintuitive.

There are only a few includes, per https://cs.chromium.org/search/?q=file:third_party/webkit+%22%23include+%5C%22components/%22+package:%5Echromium$&type=cs



1) components/variations/variations_associated_data.h
third_party/WebKit/Source/platform/scheduler/renderer/web_view_scheduler_impl_unittest.cc
this is actually just calling variations::testing::ClearAllVariationParams(); which is only a wrapper around base::FieldTrialParamAssociator::GetInstance()->ClearAllParamsForTesting();, so it's trivial



2) components/mime_util/mime_util.h
third_party/WebKit/Source/platform/network/mime/MIMETypeRegistry.cpp
third_party/WebKit/Source/platform/network/NetworkUtils.cpp
calls these methods:
bool IsSupportedImageMimeType(const std::string& mime_type)
bool IsSupportedNonImageMimeType(const std::string& mime_type)
bool IsSupportedJavascriptMimeType(const std::string& mime_type)
bool IsSupportedMimeType(const std::string& mime_type)

Looking at the implementation of these methods, this is list of image/script/html mime types that _Blink handles_. So it seems that the right place for this is Blink itself. Perhaps we should move this into a header that browser code is allowed to depend on, similar to https://cs.chromium.org/chromium/src/content/browser/DEPS?rcl=efbf364ce8d68dab5694f52e4ccc527d26281e44&l=65



3) components/link_header_util/link_header_util.h
third_party/WebKit/Source/platform/loader/LinkHeader.cpp
This was code moved from blink because we had code in the browser side service worker code which needed it. Can we move it to an inline header in blink, similar to 2?



4) components/webauth/authenticator.mojom-blink.h
third_party/WebKit/Source/modules/webauth/WebAuthentication.h
I see no reason why this mojom was added as a component instead of in webkit/public like other mojoms. Commented on https://codereview.chromium.org/2702653002



5) components/payments/mojom/payment_request.mojom-blink.h
   components/payments/mojom/payment_app.mojom-blink.h
third_party/WebKit/Source/modules/payments/PaymentResponse.h
third_party/WebKit/Source/modules/payments/PaymentInstruments.h
third_party/WebKit/Source/modules/payments/PaymentManager.h
third_party/WebKit/Source/modules/payments/PaymentAddress.h
third_party/WebKit/Source/modules/payments/PaymentRequest.h
third_party/WebKit/Source/modules/payments/PaymentsValidators.h
third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
The mojoms are included from blink, content/browser and chrome/browser per https://cs.chromium.org/search/?q=components/payments/mojom+-file:out+-file:components/payments&type=cs. I see no reason why this shouldn't just be in webkit/public like other mojoms. Commented on https://codereview.chromium.org/2811593009 and on the email thread.



 
This CL (https://chromium-review.googlesource.com/c/525692/) is going to introduce a new dependency on components/ukm/.

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2c88e2337abf58ea7320672f13302e22054ffc48

commit 2c88e2337abf58ea7320672f13302e22054ffc48
Author: Rouslan Solomakhin <rouslan@chromium.org>
Date: Wed Jun 14 22:30:31 2017

Move payment mojom files to Blink.

To reduce Blink's dependencies, move payment_app.mojom and
payment_request.mojom from //components/payments/mojom to
//third_party/WebKit/public/platform/modules/payments.

Bug: 732668
Change-Id: I9e68c019f3ab7cf1120c05e241d8129ace5c289c
Reviewed-on: https://chromium-review.googlesource.com/533474
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#479527}
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/android/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/DEPS
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/android/payments/service_worker_payment_app_bridge.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/payments/payment_request_factory.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/chrome/browser/ui/views/payments/payment_request_views_util.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/DEPS
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/android/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/android/payment_details_validation_android.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_details_validation.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_details_validation.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request_spec.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request_spec_unittest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request_state.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request_state_unittest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_request_web_contents_manager.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_response_helper.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payment_response_helper_unittest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/content/payments_validators.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/components/payments/mojom/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/DEPS
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_app_browsertest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_app_content_unittest_base.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_app_context_impl.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_app_database.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_app_provider_impl_unittest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_instrument_icon_fetcher.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_manager.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_manager.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/browser/payments/payment_manager_unittest.cc
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/common/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/common/service_worker/service_worker_event_dispatcher.mojom
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/public/browser/DEPS
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/public/browser/payment_app_provider.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/renderer/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/renderer/service_worker/service_worker_context_client.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/renderer/service_worker/service_worker_type_converters.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/content/test/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/LayoutTests/payments/resources/payment-request-mock.js
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/DEPS
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentAddress.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentInstruments.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentManager.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentRequest.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentResponse.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/public/platform/modules/payments/OWNERS
[rename] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/public/platform/modules/payments/payment_app.mojom
[rename] https://crrev.com/2c88e2337abf58ea7320672f13302e22054ffc48/third_party/WebKit/public/platform/modules/payments/payment_request.mojom

Blockedon: 739603
We can take care of 2. and 3., filed a sub-issue for that --> issue 739603
Project Member

Comment 7 by sheriffbot@chromium.org, Sep 6

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment