This change does IWYU additions for all cases where `base::DoNothing` is
used. Furthermore, this change removes some of the uses of
`base::DoNothing` as an argument default value in a header, removing the
need to add `callback_helpers.h` to those headers.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/e8436cccafc34d6e4d9c060f682345060579d208https://chromium.googlesource.com/chromium/src/+/227f058d9b9e27370a64b34046d71b9f23106409
commit e8436cccafc34d6e4d9c060f682345060579d208
Author: Lei Zhang <thestig@chromium.org>
Date: Fri Dec 12 15:16:22 2025 -0800
Forward declare base::ScopedClosureRunner in some Blink headers
Avoid including base/functional/callback_helpers.h when not needed. Also
use base/functional/callback_forward.h since callback_helpers.h was
providing callback.h. For scrollable_area.h, make this possible by
getting rid the default arguments to PerformSnapping(),
SnapAtCurrentPosition(), and SnapForEndPosition(). These methods have
very few callers, so just pass in all the arguments. Then do IWYU to fix
the build.
Change-Id: I5cfd017bd6f392b0d97e99c41d4885fac7140a4c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7254408
Commit-Queue: Philip Rogers <pdr@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Reviewed-by: Christoph Schwering <schwering@google.com>
Reviewed-by: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1558318}
commit 227f058d9b9e27370a64b34046d71b9f23106409
Author: Lei Zhang <thestig@chromium.org>
Date: Thu Dec 11 21:30:12 2025 -0800
Do IWYU for callback_helpers.h in async_dom_storage_database.cc
Add callback_helpers.h for base::DoNothing() usage. The transitive
include that makes this work as-is will be deleted in the near future.
Change-Id: Id5ba6db705434734a854874923b7bb196392ca6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7253640
Commit-Queue: Mingyu Lei <leimy@chromium.org>
Auto-Submit: Lei Zhang <thestig@chromium.org>
Reviewed-by: Mingyu Lei <leimy@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1557849}
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/b28c039343fef4ae2b4514193c7969df916d1630https://chromium.googlesource.com/chromium/src/+/125c24ee56dc5860fd442615a9a099570fb957a3
commit b28c039343fef4ae2b4514193c7969df916d1630
Author: Marc Treib <treib@chromium.org>
Date: Mon Aug 18 09:11:20 2025 -0700
Sync: Determine account managed-ness in SyncAuthManager
Currently, multiple data types (at least HISTORY and CONTACT_INFO)
determine independently, in their DataTypeController, whether the
primary account is managed or not (and turn themselves off if so).
This CL adds the managed-ness determination to the core sync machinery
(specifically SyncAuthManager), from where it's passed to the data types
via ConfigureContext.
Note that no data types use this yet - the plan is to first let this
roll out, ensure it doesn't unduly slow down sync startup etc, and then
switch over the actual data type implementations.
Bug: 40897778
Change-Id: Ife6e4f3bb4a13d68d2f40c06bdf1f2971d0ac49d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6550026
Reviewed-by: Ankush Singh <ankushkush@google.com>
Reviewed-by: Maksim Moskvitin <mmoskvitin@google.com>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1502743}
commit 125c24ee56dc5860fd442615a9a099570fb957a3
Author: Marc Treib <treib@chromium.org>
Date: Mon Aug 18 09:40:47 2025 -0700
SyncAuthManager: Pull account managed-ness checks into separate class
This CL introduces a new ActiveAccount subclass, which is responsible
for determining the account's managed-ness status whenever the account
changes.
AI notes: This was kinda-sorta AI-generated, but it took a sequence of
prompts plus a bunch of manual polishing at the end to get there.
Overall, kinda cool but not actually saving any time, since you have to
specify in quite a lot of detail what the outcome should be (and I don't
see how that could be specified in a reusable way).
Bug: 40897778
Change-Id: I9bb92a54fbe0c60fc6d0d5820894f2a64aeef2bd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6853903
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Ankush Singh <ankushkush@google.com>
Cr-Commit-Position: refs/heads/main@{#1502763}
Add `UserSelectableType::kPasswords` to list of default-enabled Sync types.
Also gate this behavior behind a default-enabled flag (in case rollback is needed).
This PR is the run of `gn format` on all `gn` files. This is a
mechanical change done with:
```sh
git ls-files -- "*.gn" | xargs gn format
git ls-files -- "*.gni" | xargs gn format
```
This change has been motivated primarily by an improvement to the
formatters privided by `gn` correcting cases of redundant target naming,
i.e cases where `//foo:foo` is used, and should just be `//foo`.
For this particular `gn` change, see:
https://chromium.googlesource.com/chromium/src/+/c822490a82cdb6ad479159683a92858f7c6f0a58
Resolves https://github.com/brave/brave-browser/issues/48161
* sync: Add experimental flag to configure the self-hosted sync service URL.
* sync: Set the |BRAVE_SYNC_ENDPOINT| directly in kSyncServerUrl/kSyncDevServerUrl using chromium_src overrides instead of passing it via command_line
* sync: Remove the test case for checking if the BRAVE_SYNC_ENDPOINT is set via the command line.
* sync: Improve self-hosted sync URL validation and rename flag
- Enhanced validation to accept only valid HTTPS URLs or trustworthy HTTP origins (e.g., localhost)
- Renamed sync URL flag to brave-override-sync-server-url and updated its description.
* sync: fix build issue due to GN deps
* Update text desc in browser/about_flags.cc
Co-authored-by: Francois Marier <francois@fmarier.org>
* sync: Add tests for Self-host sync server URL validation
Add parameterized browser tests to verify the logic in `BraveMainDelegate` for handling the `--sync-url` command-line switch / feature flag.
The tests cover the following scenarios:
- Secure HTTPS URLs are accepted.
- Insecure HTTP URLs are rejected by default.
- HTTP URLs for localhost are accepted (as a trustworthy origin).
- Insecure HTTP URLs are accepted if the origin is explicitly marked as secure via `--unsafely-treat-insecure-origin-as-secure`.
- The absence of the `--sync-url` switch.
* sync: add a warning when the user provided sync url is invalid
* sync: address test failures likely caused by merge conflicts
* test: Filter HistoryNoticeUtilsTest.WebHistoryStates due to sync endpoint change
The test fails because it expects Google's sync server endpoint while Brave
uses a different sync server endpoint.
---------
Co-authored-by: Brian Clifton <brian@clifton.me>
Co-authored-by: Francois Marier <francois@fmarier.org>
`SyncServiceImpl::OnSelectedTypesChanged` seems to be the equivalent for
what the override was being used for.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/f01471d6254029041ecbaca198271157824a2d17
commit f01471d6254029041ecbaca198271157824a2d17
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri May 16 01:42:41 2025 -0700
[sync] Avoid direct use of SyncPrefObserver from SyncServiceImpl
No expected behavioral changes.
SyncUserSettingsImpl is a layer between SyncServiceImpl and SyncPrefs
and should rather take care of propagating events to SyncServiceImpl.
In follow-up patches, further simplifications could be pursued, such as
avoiding SyncPrefObserver altogether for mutations that are exclusively
triggered by SyncUserSettingsImpl.
Change-Id: I2dd53149b2c7b9bec9c0ca85fb68b86f1ea3092d
Bug: 40772592
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6550298
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1461225}
This delegate has been introduce, which eliminates the passing of
multiple thunks to the constructor. This change has to be applied to
`BraveSyncAuthManager` as well.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c6a82680f0869c5dca816a37a6018119aa935f94
commit c6a82680f0869c5dca816a37a6018119aa935f94
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Feb 17 03:13:56 2025 -0800
[sync] Introduce SyncAuthManager::Delegate
Pure refactoring without behavioral changes.
This delegate replaces the less readable solution using callbacks,
following the same approach used by analogous classes such as
SyncServiceCrypto.
Change-Id: Ia55d9309b66a13f071ef0060315f59a604b29dfe
Bug: 387132027
This merely affects how the dependency is included in gn files.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/9756f9dc3c42efd8ae1db5612c8a6fda6564752f
commit 9756f9dc3c42efd8ae1db5612c8a6fda6564752f
Author: Henrique Ferreiro <hferreiro@igalia.com>
Date: Mon Feb 3 13:02:41 2025 -0800
Merge //components/os_crypt/sync:{sync,os_crypt} targets
//components/os_crypt/sync:sync target is an empty group with only
:os_crypt as public dependency.
Change-Id: I12e04499cd27440b1d12b7cfa7f6e7e601390ad2
This used to be passed as a raw string, however it is now wrapped as a
strong typedef.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/5658a5f971a9ab44d4412a11d8c950a111356e57
commit 5658a5f971a9ab44d4412a11d8c950a111356e57
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Nov 29 16:25:24 2024 +0000
[signin] Adopt class GaiaId components/signin and related files
SigninPrefs is excuded to reduce the delta, but otherwise most of
the signin-related code is migrated to adopt class GaiaId instead of
passing around std::string values to represent obfuscated gaia IDs.
The class temporarily supports implicit conversion to and from
std::string, which allows splitting this particular patch without
tackling the entire chromium codebase.
Change-Id: I5f8413f3ce6cc5f52e728ebd805118f79326b68b
Bug: 380416867
Previously this was a common integral, which requires wrapping the user
ID into this type now.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/bee274de563133afa840118c0117889641159a32
commit bee274de563133afa840118c0117889641159a32
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Dec 16 11:54:31 2024 -0800
Adopt class GaiaId broadly under //chrome except in unit-tests
This patch disallows implicit conversion to and from std::string for
class GaiaId, improving type safety and fixing a temporary violation of
the style guide.
Unit-tests and iOS are excluded for now via #ifdef's in gaia_id.h to
continue allowing implicit conversion, to reduce the size of this patch
and minimize the risk for regressions (as tests continue to pass without
changes).
Bug: 380416867
This PR replaces all occurences of `NOTREACHED_NORETURN` with
`NOTREACHED`, since they are semantically identical.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/5a9d4c5aa85977fc711eb9c0ff1207c5ac1a0959
commit 5a9d4c5aa85977fc711eb9c0ff1207c5ac1a0959
Author: Peter Boström <pbos@chromium.org>
Date: Tue Nov 12 01:38:46 2024 +0000
Remove enable_log_error_not_reached
This flag only applied to NOTREACHED_IN_MIGRATION() for ChromeOS which
is on its way out.
Bug: 40580068
We now have to go through a different interface to query from
`DataTypeManagers` controllers the entity count. This simplifies the
code in place a bit too.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/9ffc40279cbdeb0d1c8d522f432b20c022c23778https://chromium.googlesource.com/chromium/src/+/580e71ccd3f7b59eafa956e24c720d33c9f8cf0e
commit 9ffc40279cbdeb0d1c8d522f432b20c022c23778
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Oct 1 18:54:34 2024 +0000
[sync] Encapsulate controller access inside DataTypeManager
This is the last patch in a series that removes the temporary API in
DataTypeManager that exposed direct access to the underlying
controllers.
Such access is still allowed for testing, but otherwise controllers are
now fully owned and managed by DataTypeManagerImpl.
Semi-related, to exposure of DataTypeStatusTable::TypeErrorMap as part
of DataTypeManager's ConfigureResult is also removed, as it leaks
internal state and is exclusively used for tests.
Change-Id: I674c56cf6e49a1149b8a85fea6afc060aaf2d91b
Bug: 40901755
commit 580e71ccd3f7b59eafa956e24c720d33c9f8cf0e
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Sep 27 13:46:16 2024 +0000
[sync] Refactor debug-only logic away from SyncServiceImpl
The functionality to list sync nodes and counters that power
sync-internals are now part of DataTypeManager's API and the
implementation moved partially to a dedicated class and file.
This removes one case where SyncServiceImpl needed to iterate the
controller map, which should eventually become a private member in
DataTypeManager.
Bug: 40901755
[CodeHealth] Enable `-Wunsafe-buffer-usage` acrosss brave
This PR removes `brave/` from the blanket exclusion for
`-Wunsafe-buffer-usage`, and adds only certain third party subpaths to
it. Additionally, in order correct the ensuing warning violations, this
PR adds to individual files exclusion annotations, that we can revisit
gradually.
Having this warning on will prevent further violations from popping up
in new places in the codebase. A significant amount of effort has
already been employed in correcting some of these unsafe buffer usages.
For reference:
https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/unsafe_buffers.md
Resolves https://github.com/brave/brave-browser/issues/41660
Use `constexpr` strings
This PR changes moves away from uses of `const char` with two
approaches. For `.cc` files, these types are turned into constexpr ones,
which gives the compiler more leeway for optimisations.
For the constants on header files, we are converting these instances to
`inline constexpr`, in order to also reduce string duplication across
the binary.
This change was generated with a tool.
This event used to be part of the base class. Now with its deletion the
internal function `SyncServiceImpl::StopAndClear` has to be exposed
through `BraveSyncServiceImpl` to keep the existing code in use.
This change turns the private function into a virtual function, to allow
us to keep plugging our own changes into it.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/769c49bea8b02913b69c1607bbe3d2190a3067bb
commit 769c49bea8b02913b69c1607bbe3d2190a3067bb
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Wed Aug 21 12:41:28 2024 +0000
Remove SyncService::StopAndClear()
The method can be removed from the interface, its last usage was
removed in crrev.com/c/5800572.
Bug: 40797392
This type, header, and derived types are now gone, with the new
`DataType` being used. This change corrects variable naming, header
inclusions, etc.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/41d2a6c29f4b0a3ed5321841ddf8b3d715f02d58
commit 41d2a6c29f4b0a3ed5321841ddf8b3d715f02d58
Author: Mikel Astiz <mastiz@chromium.org>
Date: Wed Aug 7 11:47:19 2024 +0000
[sync] Migrate remaining components/sync from ModelType to DataType
Pure refactoring without behavioral changes.
All occurrences of syncer::ModelType are about to be replaced with
syncer::DataType, following the rationale in the linked bug. This patch
tackles occurrences under components/sync and some dependencies.
Most of the changes were auto-generated via commands below, which also
required manually excluding some undesired changes:
git grep -l model_type -- components/sync | \
grep -v model_type\\.h | grep -v data_type\\.h | \
grep -v BUILD.gn | \
xargs sed -i 's/model_type/data_type/g'
git grep -l ModelType -- components/sync | \
grep -v model_type\\.h | grep -v data_type\\.h | \
xargs sed -i -E 's/([^.]|^)ModelType/\1DataType/g'
git grep -l UserSelectableTypeToAllModelTypes | \
xargs sed -i '/UserSelectableTypeToAllModelTypes/UserSelectableTypeToAllDataTypes
/g'
git diff --name-only HEAD | \
xargs sed -i "s/DataTypeEntityChange/ModelTypeEntityChange/g"
git diff --name-only HEAD | \
xargs sed -i "s/InvalidationPerDataType/InvalidationPerModelType/g"
git diff --name-only HEAD | \
xargs sed -i "s/Model type/Data type/g"
git diff --name-only HEAD | \
xargs sed -i "s/model type/data type/g"
git cl format
NO_IFTTT=Matches enums.xml without additional changes
Change-Id: I1edd7f45f6ff22e0dfd2a959431d38ca4593e7d4
Bug: 356649891
https://chromium.googlesource.com/chromium/src/+/1cce04152760c71cde8c8fe90bbb1241128a7b13
commit 1cce04152760c71cde8c8fe90bbb1241128a7b13
Author: Mikel Astiz <mastiz@chromium.org>
Date: Wed Aug 7 17:10:53 2024 +0000
[sync] Clean up leftovers after ModelType rename to DataType
A recent patch series renamed syncer::ModelType to syncer::DataType,
with a temporary alias being introduced for a gradual migration. Now
that all references have been migrated to the new name, the temporary
alias can be removed from code.
The patch also includes some minor leftover renames.
Change-Id: Ibed5292fd96fdcbe9592b4bd268faa428da50627
Bug: 356649891
This is in line with previous changes, where the prefix `Model` is being
replaced with `Data`. This change corrects the name of types, variables,
inclusion paths, and also renames shadow files.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/1f5656458d6879d589bc1568ee1dab13050d0fc5
commit 1f5656458d6879d589bc1568ee1dab13050d0fc5
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Aug 6 16:15:30 2024 +0000
[sync] Rename ModelTypeState to DataTypeState
See linked bug for rationale.
The proto is renamed without behavioral changes using the commands
below. Note that some occurrences need to be excluded because they are
database column names that would require a migration, which also means
the patch needs careful review.
git grep -l ModelTypeState | \
xargs rename 's/model_type_state/data_type_state/'
git mv components/sync/protocol/model_type_state_helper_unittest.cc \
components/sync/protocol/data_type_state_helper_unittest.cc
git add .
tools/git/mass-rename.py
git grep -l ModelTypeState | \
xargs sed -i 's/ModelTypeState/DataTypeState/g'
git grep -l model_type_state | \
xargs sed -i 's/model_type_state/data_type_state/g'
git grep -l _data_type_state | \
xargs sed -i -E 's/(autofill|history|plus_address_sync|typed_url)_data_type_state/\1_model_type_state/g'
git cl format
Some forward declaration orderings and includes were fixed manually.
Change-Id: I97a371fee5c7688a5090cf034a0418b989f29862
Bug: 356649891
https://chromium.googlesource.com/chromium/src/+/209e0271904abe753d64602d165b791005a98905
commit 209e0271904abe753d64602d165b791005a98905
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Aug 6 09:13:48 2024 +0000
[sync] Rename enum ModelType to DataType (with temporary alias)
Pure refactoring without behavioral changes.
All occurrences of syncer::ModelType are about to be replaced with
syncer::DataType, following the rationale in the linked bug.
As a first step, the enum and some of the functions that come together
with it are forked, in order to allow a gradual migration.
The renames in Java code are bundled into this first patch as they
aren't that many and they are harder to split.
Change-Id: Ibeeabd0355ee2c86bdfd99b7002c95bc6a1f3ccf
Bug: 356649891
This is merely a name change, which also affects class names, but should
have no functional effect to the code.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/d6859549f6684a0e3317979dc75b6d543328a8f7
commit d6859549f6684a0e3317979dc75b6d543328a8f7
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Aug 5 10:34:29 2024 +0000
[sync] Rename internal types to avoid ModelType in the name
See linked bug for rationale.
Pure refactoring to rename classes, generated using the following
commands:
git grep -l ModelType \
-- components/sync/engine components/sync/test | \
xargs rename 's/model_type_/data_type_/'
git add .
tools/git/mass-rename.py
git grep -l ModelType | \
xargs sed -i -E 's/ModelType(Registry|Connector|Configurer|Worker|Debug)/DataType\1/g'
git grep -l model_type_ | \
xargs sed -i -E 's/model_type_(registry|connector|configurer|worker|debug)/data_type_\1/g'
git cl format
Change-Id: Ied81019c80822909645fc5fc30527fe541316b15
Bug: 356649891
https://chromium.googlesource.com/chromium/src/+/07a3db9aba9a84f01f61159544006af6f069e517
commit 07a3db9aba9a84f01f61159544006af6f069e517
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Aug 2 06:10:11 2024 +0000
[sync] Rename ModelTypeController to DataTypeController
See linked bug for rationale. Pure refactoring with automated renames,
using the following commands:
git grep -l ModelTypeController | \
xargs rename 's/model_type_controller/data_type_controller/'
git add .
tools/git/mass-rename.py
git grep -l ModelTypeController | \
xargs sed -i 's/ModelTypeController/DataTypeController/g'
git grep -l model_type_controller | \
xargs sed -i 's/model_type_controller/data_type_controller/g'
git cl format
Change-Id: Iab738f6a0c3f38a71d54d79cda4a7078d3c5486a
Bug: 356649891
https://chromium.googlesource.com/chromium/src/+/31a57c5eef28c0b7b6098ba7549efc39726d3a30
commit 31a57c5eef28c0b7b6098ba7549efc39726d3a30
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Aug 5 15:45:52 2024 +0000
[sync] Rename ModelTypeStore to DataTypeStore (part 2 of 2)
See linked bug for rationale.
Quick follow-up to https://crrev.com/c/5756944 where the files were
renamed. In this patch, the classes are renamed too, generated using
the following commands:
git grep -l ModelTypeStore | \
xargs sed -i 's/\([^.]\)ModelTypeStore/\1DataTypeStore/g'
git grep -l ModelTypeStore | \
xargs sed -i 's/^ModelTypeStore/DataTypeStore/g'
git grep -l model_type_store | \
xargs sed -i 's/model_type_store/data_type_store/g'
git cl format
Some DependsOn() orderings were fixed manually, as well as string
occurrences in ProfileKeyedServiceBrowserTest and calls to the
factories' GetInstance() functions.
Note that renaming proto ModelTypeStoreSchemaDescriptor is fine
because it is used locally (client-side) only and it gets serialized
into bytes, where the message name isn't encoded.
Change-Id: I2f3b9d1c73d3bac6339f112d54c12e638ea06d66
Bug: 356649891
This change affects the name of certain types and derived types, as well
as some shadow files we have to override the classes affected.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d6859549f6684a0e3317979dc75b6d543328a8f7
commit d6859549f6684a0e3317979dc75b6d543328a8f7
Author: Mikel Astiz <mastiz@chromium.org>
Date: Mon Aug 5 10:34:29 2024 +0000
[sync] Rename internal types to avoid ModelType in the name
See linked bug for rationale.
Pure refactoring to rename classes, generated using the following
commands:
git grep -l ModelType \
-- components/sync/engine components/sync/test | \
xargs rename 's/model_type_/data_type_/'
git add .
tools/git/mass-rename.py
git grep -l ModelType | \
xargs sed -i -E 's/ModelType(Registry|Connector|Configurer|Worker|Debug)/DataType\1/g'
git grep -l model_type_ | \
xargs sed -i -E 's/model_type_(registry|connector|configurer|worker|debug)/data_type_\1/g'
git cl format
Change-Id: Ied81019c80822909645fc5fc30527fe541316b15
Bug: 356649891
This change corrects our overriding and uses of `Initialize`, to have
the controller list passed along. The tests we have for
`BraveSyncServiceImpl` also had to be corrected, with the initialisation
step moved into the service creation step, as the controllers have to be
provided at that point.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/1a3d38447a0c7e217b8bd887d6debc8c58655032
commit 1a3d38447a0c7e217b8bd887d6debc8c58655032
Author: Mikel Astiz <mastiz@chromium.org>
Date: Thu Aug 1 07:44:06 2024 +0000
[sync] Inject controllers via Initialize() rather than via SyncClient
Pure refactoring without behavioral changes.
Before this patch, the first thing SyncServiceImpl::Initialize() did is
to create controllers via SyncClient::CreateModelTypeControllers(),
which brings back the control to the very same platform-specific layer
(client/factory pair) that initiated the Initialize() call.
Instead, with this patch, the list of controllers is passed as
parameter to Initialize(), avoiding a less obvious round trip.
This also allows controllers to be built in the SyncService factory
implementation rather than in SyncClient's, centralizing the use of
DependsOn() factories in the same file.
Moving controller-creating code from the client to the factory is
tedious. Hence, in this patch, only ios/web_view is tackled fully. The
other two cases (chrome/ and ios/browser/) work this around by
continuing to expose a public CreateModelTypeController() API, exercised
by the factory.
Bug: 335688372
This change is a combination of two incremental renaming changes, where
types and header names were changed. This has no functional effect.
Chromium changes:
https://chromium.googlesource.com/chromium/src/+/07a3db9aba9a84f01f61159544006af6f069e517
commit 07a3db9aba9a84f01f61159544006af6f069e517
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Aug 2 06:10:11 2024 +0000
[sync] Rename ModelTypeController to DataTypeController
See linked bug for rationale. Pure refactoring with automated renames,
using the following commands:
git grep -l ModelTypeController | \
xargs rename 's/model_type_controller/data_type_controller/'
git add .
tools/git/mass-rename.py
git grep -l ModelTypeController | \
xargs sed -i 's/ModelTypeController/DataTypeController/g'
git grep -l model_type_controller | \
xargs sed -i 's/model_type_controller/data_type_controller/g'
git cl format
Change-Id: Iab738f6a0c3f38a71d54d79cda4a7078d3c5486a
Bug: 356649891
https://chromium.googlesource.com/chromium/src/+/1c65b5f6e21d577b44f5938c81247f2d5d26d476
commit 1c65b5f6e21d577b44f5938c81247f2d5d26d476
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Aug 2 16:42:30 2024 +0000
[sync] Rename ModelTypeSyncBridge to DataTypeSyncBridge
...as well as ModelType[Change]Processor, motivated by the desire to
avoid "model type" in the name and prefer "data type" instead. For
ModelTypeChangeProcessor specifically, the new name also adopts
"local" in the name to distinguish it from ModelTypeProcessor (now
DataTypeProcessor).
See linked bug for more detailed rationale.
Pure refactoring with automated renames, using the following
commands:
git grep -l ModelTypeSyncBridge | \
xargs rename 's/model_type_sync_bridge/data_type_sync_bridge/'
git grep -l ModelTypeChangeProcessor | \
xargs rename 's/model_type_change_processor/data_type_local_change_processor/'
git grep -l ModelTypeProcessor | \
xargs rename 's/model_type_processor/data_type_processor/'
git add .
tools/git/mass-rename.py
git grep -l ModelTypeSyncBridge | \
xargs sed -i 's/ModelTypeSyncBridge/DataTypeSyncBridge/g'
git grep -l model_type_sync_bridge | \
xargs sed -i 's/model_type_sync_bridge/data_type_sync_bridge/g'
git grep -l ModelTypeChangeProcessor | \
xargs sed -i 's/ModelTypeChangeProcessor/DataTypeLocalChangeProcessor/g'
git grep -l ModelTypeProcessor | \
xargs sed -i 's/ModelTypeProcessor/DataTypeProcessor/g'
git cl format
Finally, some forward declaration orderings were fixed manually.
Change-Id: I075d86eb2492e477746f3238fcd3f8f2d3ce483b
Bug: 356649891
This change affects type names, as well as the shadowing of one of the
overridden files.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/055d1fc1b35008bb5cd25d829a3141e0e8ac42c9
commit 055d1fc1b35008bb5cd25d829a3141e0e8ac42c9
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Jul 30 10:43:59 2024 +0000
[sync] Rename SyncApiComponentFactory to SyncEngineFactory
Pure refactoring without behavioral changes.
The concept of "sync API" has no meaning nowadays and this class
hierarchy's scope, after recent changes, is exclusively about dealing
with SyncEngine and the transport data underneath.
To make the name more accurate and less abstract, this patch adopts
SyncEngineFactory.
Change-Id: I4e241d61de82b4475160e4bc9b60d35316223429
Bug: 335688372