New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624590 link

Starred by 7 users

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

Trim down components/

Project Member Reported by jam@chromium.org, Jun 29 2016

Issue description

Over the last while, a few observations have come up regarding src/components/:
-it's hard for folks to understand what the layering looks like
-there are too many directories in components
-transitive dependencies sneak in (i.e. content can't depend on components\x, but then someone makes it depend on components\y which now or later depends on components\x)
-it's a dumping ground
-it was much easier to understand when components was just layered components that were shared with iOS

(see some conversation and meeting notes, specifically about net, at https://groups.google.com/a/chromium.org/forum/#!topic/net-dev/VcqlFVnmZQ0)


Action items, based on above discussions along with other components and top level owners:
-a bunch of components that are related to networking, if they have no dependencies on other components, will move to components/net.
-we will move components/ that were moved there but aren't needed anymore (about_handler and test_runner come to mind, which were a result of previous refactorings that aren't needed)


The goal should be to end up with a components directory that is not nearly 200 directories, and one which doesn't keep growing at a large pace.

See https://docs.google.com/spreadsheets/d/1hUkwoyFp-Ykyk4Llde8wlefJm5kEf5OHH_48OAG8Jvg/edit#gid=0 for a list of existing directories and which ones can stay/move.
 

Comment 1 by danakj@chromium.org, Jun 29 2016

A random +1 would love to see DEPS reflected more in the directory structure. :)
about_handler is still used on iOS and should not be moved back to chrome/browser.

$  git grep about_handler -- ios
ios/chrome/browser/BUILD.gn:    "//components/about_handler",
ios/chrome/browser/DEPS:  "+components/about_handler",
ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc:#include "components/about_handler/about_protocol_handler.h"
ios/chrome/browser/browser_state/chrome_browser_state_io_data.cc:      base::WrapUnique(new about_handler::AboutProtocolHandler()));
ios/chrome/ios_chrome.gyp:        '../../components/components.gyp:about_handler',

It is also possible that some of the layered components or code that was moved to components only has usage on iOS in the downstream repository. So when considering whether some code should be moved outside of components/ please check the git log, and if the code was componentised for reuse by iOS, assume this is still the case.
You can also contact me as a representative of iOS if you want to know whether some components is still used by iOS or not.

Comment 4 by jam@chromium.org, Jul 12 2016

re comment 2: I realize about_handler is included, but given that Chrome's network stack isn't used on iOS and is only used internally for Chrome's requests, it's my understanding that the about handler isn't need any more on iOS.

Thanks for volunteering to be the iOS rep for this effort!

Comment 5 by jam@chromium.org, Jul 12 2016

Blockedon: 627509

Comment 6 by jam@chromium.org, Jul 12 2016

Blockedon: 627510

Comment 7 by jam@chromium.org, Jul 12 2016

Blockedon: 627517

Comment 8 by jam@chromium.org, Jul 13 2016

Blockedon: 628024
Project Member

Comment 9 by bugdroid1@chromium.org, Jul 22 2016

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

commit 77c81222036bb21896fdec81724a154884c98f42
Author: jam <jam@chromium.org>
Date: Fri Jul 22 05:50:22 2016

Clarify components/README about when to create a component.

BUG= 624590 

Review-Url: https://codereview.chromium.org/2166093002
Cr-Commit-Position: refs/heads/master@{#407075}

[modify] https://crrev.com/77c81222036bb21896fdec81724a154884c98f42/components/README

Blockedon: 630837

Comment 11 by jam@chromium.org, Aug 10 2016

Blockedon: 585292
Blockedon: 644022
Project Member

Comment 13 by sheriffbot@chromium.org, Sep 5 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

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

Sign in to add a comment