Chromium change:
https://chromium.googlesource.com/chromium/src/+/d00f800f7d6372decfce0f897c54bab3e43e99b1
commit d00f800f7d6372decfce0f897c54bab3e43e99b1
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Mon Feb 1 15:18:45 2021 +0000
[Sync Model/Engine split] Merge {model,engine}_impl with {model,engine}
The distinction between the impl and non-impl directories has become
unclear over time, as well as the dependencies between them. This CL
merges them. This will allow us to create separate build targets for
engine/ and model/ (model/ depends on engine/). Subdirectories are
merged correspondingly, e.g. engine_impl/cycle/ is merged with
engine/cycle/.
Orthogonal to this, we remove 1 unnecessary engine/ dependency from
components/password_manager/core/browser/DEPS, and make some net/
dependencies more specific in sync/ DEPS.
Bug: 947443
SyncApiComponentFactoryMock is no longer available upstream, and
FakeSyncApiComponentFactory should be used instead, along with
some other smaller changes derived from other recent related
changes upstream.
This patch adapts the unit tests to maintain the same behaviour
while using the new fake-based APIs, instead of the old ones.
[TODO] BraveProfileSyncServiceTest.NoIdentityManagerCalls is not
completely migrated yet, we still need to migrate mock-based check
EXPECT_CALL(*engine(), OnCookieJarChanged(_, _)).Times(0)
Chromium changes:
https://chromium.googlesource.com/chromium/src.git/+/dcdd123f162664500d3976cdcb8e575ad8711bcfhttps://chromium.googlesource.com/chromium/src.git/+/0ff6cfd2ae2f17dd8f99ae09f04b0fb24fd2a09fhttps://chromium.googlesource.com/chromium/src.git/+/e60c93afaa485a6641ccd26222581626f74a7cac
commit dcdd123f162664500d3976cdcb8e575ad8711bcf
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Jan 29 18:43:53 2021 +0000
[sync] Move SyncTransportDataPrefs closer to SyncEngineImpl
These preferences represent the internal bookkeeping data that the
implementation of the sync engine owns (SyncEngineImpl, backend, etc.),
to be persisted in prefs.
This patch moves the resposibility for dealing with prefs (reads and
writes) from ProfileSyncService to SyncEngineImpl, simplifying some of
of the APIs in between and adhering to more strict layering principles.
Instead of moving all functionality in a single patch, the most relevant
parts are moved, but TODOs are added to move the remaining parts and
therefore completely avoid the dependency from ProfileSyncService to
SyncTransportDataPrefs. Meanwhile, *both* ProfileSyncService and
SyncEngineImpl interact with these preferences, which is obviously not
great.
Bug: 938894
commit 0ff6cfd2ae2f17dd8f99ae09f04b0fb24fd2a09f
Author: Mikel Astiz <mastiz@chromium.org>
Date: Fri Jan 29 12:52:21 2021 +0000
[sync] Avoid abuse of mocks in ProfileSyncService tests
In particular the tests in ProfileSyncServiceStartupTest made heavy use
of statefull mocks, well beyond a reasonable use of mocks.
Instead, this patch adopts fakes that mimic the production behavior
without tests having to carefully do so. For DataTypeManager, there is
currently no fake, so instead the actual DataTypeManagerImpl is used,
which is perfectly testable in combination with FakeDataTypeController.
Bug: 938894
commit e60c93afaa485a6641ccd26222581626f74a7cac
Author: Marc Treib <treib@chromium.org>
Date: Tue Jan 26 17:10:16 2021 +0000
Cleanup: Remove initial_types param from DataTypeManagerImpl's ctor
The param was used to initialize the downloaded_types_ member, but that
anyway got recomputed in ActivateDataTypes(), so the initial value had
no effect. This CL removes the param, and all the plumbing that was in
place for it.
Note that there was one test which used the initial_types param, with
the intention of marking these types as "already downloaded". The test
passes before as after this CL. Fixing the test so that it actually
tests what it claims to test is left as a followup.
Bug: 1170318
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/d00f800f7d6372decfce0f897c54bab3e43e99b1
commit d00f800f7d6372decfce0f897c54bab3e43e99b1
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Mon Feb 1 15:18:45 2021 +0000
[Sync Model/Engine split] Merge {model,engine}_impl with {model,engine}
The distinction between the impl and non-impl directories has become
unclear over time, as well as the dependencies between them. This CL
merges them. This will allow us to create separate build targets for
engine/ and model/ (model/ depends on engine/). Subdirectories are
merged correspondingly, e.g. engine_impl/cycle/ is merged with
engine/cycle/.
Orthogonal to this, we remove 1 unnecessary engine/ dependency from
components/password_manager/core/browser/DEPS, and make some net/
dependencies more specific in sync/ DEPS.
TBR=sky@chromium.org
Bug: 947443
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/e6f8dd260408c85298a2e22a77064e127db6ffd5
commit e6f8dd260408c85298a2e22a77064e127db6ffd5
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Wed Dec 16 08:53:49 2020 +0000
[sync] Stop recording obsolete cookie jar histograms
Sync.{CookieJarEmptyOnMismatch,CookieJarMatchOnNavigation} have been
expired since M77. This CL marks them as obsolete and removes the
associated plumbing to record them, which is considerable.
Bug: 1158449
- renamed target to "unit_tests"
- fixed gn_check errors
- moved brave_sync_auth_manager_unittest.cc from test/BUILD.gn into proper target
- had to apply lint to whole test/BUILD.gn
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/52c253e300831067aa75506906a4af2064edadb2
commit 52c253e300831067aa75506906a4af2064edadb2
Author: danakj <danakj@chromium.org>
Date: Wed Nov 11 21:56:28 2020 +0000
Reland "Remove empty base/bind_helpers.h"
This is a reland of 6f8b5118468b9a64fccf59d7918b88f4c7c5342b
Original change's description:
> Remove empty base/bind_helpers.h
>
> The contents moved to callback_helpers.h.
>
> Also renames a few new bind_helpers.h includes that have been added
> in the meantime.
>
- renamed target to "unit_tests"
- fixed gn_check errors
- moved brave_sync_auth_manager_unittest.cc from test/BUILD.gn into proper target
- had to apply lint to whole test/BUILD.gn
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0ddc774501addfbafeee70ff5f30a276f869d7bb
commit 0ddc774501addfbafeee70ff5f30a276f869d7bb
Author: Boris Sazonov <bsazonov@chromium.org>
Date: Thu Jun 25 17:15:49 2020 +0000
[Android] Move AndroidSyncSettings to org.chromium.chrome.browser.sync
Moves AndroidSyncSettings from org.chromium.components.sync to
org.chromium.chrome.browser.sync. There are several reasons for this
move:
1. AndroidSyncSettings is a singleton that interacts with Android sync
settings, so it is better suited for browser/sync.
2. AndroidSyncSettings interacts with ChromeSigninController that is
going to be removed in favor of IdentityManager.
Bug: 1093998
This is to mitigate the chance of bookmarks duplication when first time
sync which is caused by first device send it local bookmarks only after
a poll interval(60s). When second device wants to do
BookmarkModelMerger::Merge(), it can't get anything from server because
first device hasn't sent any. So it commit its own bookmarks which will
cause duplication.
Note: Chrome has FCM invalidation ready so its first device will receive
notification within ~10s
Reason we need space separator:
In `components/sync/driver/about_sync_util.cc`,
`client_version` and `username` both are `Stat<std::string>*` setting a string
directly. And then pass data to js through `onAboutInfoUpdated` event
which will be eventually passed to `jstProcess` and get value through
`chrome.sync.about_tab.highlightIfChanged(this, this.children[1].innerText, stat_value)'>`
The whole process is no different between these two but <td> of
`username` will have tremendously long width if we don't put any space
in the string.