New issue
Advanced search Search tips

Issue 847166 link

Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

Cleanup: Bring naming conventions of //ios/chrome KeyedService factories into line with //chrome factories

Project Member Reported by blundell@chromium.org, May 28 2018

Issue description

The convention is for these factories to be named identically between //chrome and //ios/chrome to reduce cognitive load between engineers who work across Chrome on iOS and other platforms. There are lots of exceptions due to the incremental unforking of iOS from //chrome. As background work, we can bring these exceptions into line as we find them. Each exception that we remove makes the codebase incrementally better :).

The formula to convert a given factory for a class Foo is simple. Let's assume that the current factory is in ios/chrome/foo/ios_chrome_foo_factory.*.

git mv ios/chrome/foo/ios_chrome_foo_factory.h ios/chrome/foo/foo_factory.h
git mv ios/chrome/foo/ios_chrome_foo_factory.cc ios/chrome/foo/foo_factory.cc
./tools/git/mass-rename.py
git commit -am "Move files"
./tools/git/mffr.py -g "ios/chrome/*" IOSChromeFooFactory FooFactory
git cl format
git commit -am "Rename class"

 
Project Member

Comment 1 by bugdroid1@chromium.org, May 28 2018

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

commit ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149
Author: Colin Blundell <blundell@chromium.org>
Date: Mon May 28 10:11:06 2018

[iOS] s/OAuth2TokenServiceFactory/ProfileOAuth2TokenServiceFactory/g

This CL brings the //ios/chrome factory for ProfileOAuth2TokenService
into the same naming convention as the //chrome factory. The convention
is for these factories to be named identically between //chrome and
//ios/chrome to reduce cognitive load between engineers who work across
Chrome on iOS and other platforms (although there are doubtless other
inconsistencies that should be fixed as well).

Bug: 847166
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I82281a9fe5cbf2fe93ad9631dd6f8a278f40da65
Reviewed-on: https://chromium-review.googlesource.com/1074657
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562225}
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/browser_state/browser_state_keyed_service_factories.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/gcm/ios_chrome_gcm_profile_service_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provider_factory.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/BUILD.gn
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/about_signin_internals_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/account_fetcher_service_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/account_reconcilor_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/authentication_service_factory.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/authentication_service_fake.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/authentication_service_unittest.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/fake_signin_manager_builder.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/gaia_cookie_manager_service_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/identity_manager_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/identity_service_creator.cc
[rename] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/profile_oauth2_token_service_factory.h
[rename] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/profile_oauth2_token_service_factory.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/signin/signin_manager_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/sync/ios_chrome_profile_sync_service_factory.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/ui/authentication/signed_in_accounts_view_controller.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/ui/settings/accounts_collection_view_controller.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller_unittest.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller.mm
[modify] https://crrev.com/ce0617a9d6ba9f0fdedca4ec2da2c63ce50ce149/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm

Project Member

Comment 2 by bugdroid1@chromium.org, May 28 2018

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

commit 23aee5029afcc86bafbff73eea49bd70bcf00657
Author: Colin Blundell <blundell@chromium.org>
Date: Mon May 28 12:37:31 2018

[iOS] s/IOSChromeProfileSyncServiceFactory/ProfileSyncServiceFactory/g

This CL brings the //ios/chrome factory for ProfileSyncService
into the same naming convention as the //chrome factory. The convention
is for these factories to be named identically between //chrome and
//ios/chrome to reduce cognitive load between engineers who work across
Chrome on iOS and other platforms (although there are doubtless other
inconsistencies that should be fixed as well).

Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I8cac954ce1c5f75f3713084e9135f3e0b3d487c8
Bug: 847166
Reviewed-on: https://chromium-review.googlesource.com/1074697
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562237}
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/app/spotlight/topsites_spotlight_manager.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/autocomplete/autocomplete_provider_client_impl.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/browser_state/bookmark_model_loaded_observer.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/browser_state/browser_state_keyed_service_factories.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/browser_state/chrome_browser_state_manager_impl.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/browsing_data/browsing_data_counter_wrapper.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/history/web_history_service_factory.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/metrics/ios_chrome_metrics_service_client.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/passwords/ios_chrome_password_manager_client.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/passwords/ios_chrome_password_store_factory.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/passwords/password_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/signin/authentication_service_factory.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/signin/authentication_service_fake.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/signin/authentication_service_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/suggestions/suggestions_service_factory.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/BUILD.gn
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/glue/sync_start_util.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/ios_chrome_sync_client.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/ios_user_event_service_factory.cc
[rename] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/profile_sync_service_factory.cc
[rename] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/profile_sync_service_factory.h
[rename] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/profile_sync_service_factory_unittest.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/sync_setup_service_factory.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/sync/synced_sessions_bridge.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/autofill/chrome_autofill_client_ios.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/contextual_search/touch_to_search_permissions_mediator_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/history/history_collection_view_controller_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/history/history_coordinator.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/history/history_panel_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/ntp/recent_tabs/legacy_recent_tabs_table_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/ntp/recent_tabs/recent_tabs_table_coordinator_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/recent_tabs/recent_tabs_mediator.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/accounts_collection_egtest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/accounts_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/passphrase_collection_view_controller_test.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/settings_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_encryption_collection_view_controller_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller_unittest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_utils/sync_error_infobar_delegate.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/settings/sync_utils/sync_fake_server_egtest.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/tab_switcher/tab_switcher_controller.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/tab_switcher/tab_switcher_model.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/tab_switcher/tab_switcher_utils.mm
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc
[modify] https://crrev.com/23aee5029afcc86bafbff73eea49bd70bcf00657/ios/chrome/test/app/sync_test_util.mm

Components: Internals

Sign in to add a comment