Chromium change:
https://chromium.googlesource.com/chromium/src/+/91c345cf4eac0adbb428db6449384028dfac7bd3
commit 91c345cf4eac0adbb428db6449384028dfac7bd3
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue May 16 14:18:56 2023 +0000
[sync] Rename components/sync/driver to components/sync/service
It was agreed within the Sync team that the name 'driver' conveys
little and is a historic artifact. The new name, 'service', reflects
what most dependent targets care about: SyncService and adjacent APIs.
Semi-automated patch generated via:
git mv components/sync/driver components/sync/service
./tools/git/mass-rename.py
cat /tmp/affected-files.txt | \
xargs sed -i 's/#include/#import/g'
git grep -l 'sync/driver' |\
xargs sed -i 's/components\/sync\/driver/components\/sync\/service/g'
git grep -l 'sync_driver_sync_internals' |\
xargs sed -i 's/sync_driver_sync_internals/sync_service_sync_internals/g'
git grep -l 'components/sync/service:driver' |\
xargs sed -i 's/sync\/service:driver/sync\/service/g'
git grep -l 'kSyncDriverSyncInternalsResources' |\
xargs sed -i\
's/kSyncDriverSyncInternalsResources/kSyncServiceSyncInternalsResources/g'
git grep -l 'IDR_SYNC_DRIVER_SYNC' | \
xargs sed -i 's/IDR_SYNC_DRIVER_SYNC/IDR_SYNC_SERVICE_SYNC/g'
sed -i 's/driver/service/g' components/sync/service/BUILD.gn\
components/sync/service/sync_api_component_factory.h
sed -i 's/_H__/_H_/g' components/sync/service/*.h
git cl format
Manual changes include:
1. Build target rename in components/sync/driver/BUILD.gn.
2. Header guard issues surfaced by presubmit.
3. Several header files reintroduced to avoid breaking downstream.
Disable-Rts: True
Change-Id: If23629e79e781e55c3d783e3074fb536311928d6
Bug: 1444709
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/cd23b8b9d212daf06dde638488dbaa355d6651fa
commit cd23b8b9d212daf06dde638488dbaa355d6651fa
Author: Daniel Cheng <dcheng@chromium.org>
Date: Fri Sep 16 17:16:24 2022 +0000
Move bind.h, callback{,_forward,_helpers}.h into //base/functional
Forwarding headers remain in the old locations to ease migration.
Include paths for files in //base/functional/ are also fixed up to the
new canonical path; remaining fixups are deferred until followups to
minimize the risk of conflicts.
Bug: 1364441
Task posting v3 handle refactor - II
This change is following upstream refactor for task runner provisioning.
This primarily involves changing how we are fetching the default current
sequence/thread runners.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/edb604e09fa4ac6eb56f447b643085afda6150a9
commit edb604e09fa4ac6eb56f447b643085afda6150a9
Author: Sean Maher <spvw@chromium.org>
Date: Thu Jan 12 15:18:20 2023 +0000
task posting v3: Remove task runner handles from codebase entirely
As the last CL of the task runner handle refactor, this CL removes
Single and Thread task runner handles from the codebase entirely. The
new API for this functionality can be found under
(SingleThread|Sequenced)TaskRunner::CurrentDefaultHandle,
::GetCurrentDefault(), ::HasCurrentDefault(), and
::CurrentHandleOverride(ForTesting).
Bug: 1026641
Chromium change:
https://chromium.googlesource.com/chromium/src/+/0cc14ba767331dd13bda825c5451a826e10d73a7
commit 0cc14ba767331dd13bda825c5451a826e10d73a7
Author: Jun Zou <junzou@chromium.org>
Date: Mon Nov 7 23:51:13 2022 +0000
Reland: Add sync device info observer for segmentation. Record uma metrics of device count by os types.
Update segmentation service factory for iOS.
- Derives OS types from DeviceInfo data from Sync.
- Adds a segmentation observer to device info tracker.
- Counts devices by OS types.
- Records UMA metrics for device count by OS types.
- Adds a Finch flag for active days threshold.
Previously reverted change: https://chromium-review.googlesource.com/c/chromium/src/+/3965194
Bug: b/254338267
Chromium change:
https://chromium.googlesource.com/chromium/src/+/c50274ffd343122ca33008eba7c8f057bd70d6fc
commit c50274ffd343122ca33008eba7c8f057bd70d6fc
Author: Maksim Moskvitin <mmoskvitin@google.com>
Date: Wed Aug 24 13:42:41 2022 +0000
[Cleanup] Remove dead code from DeviceInfo
DeviceInfo::ToValue() claimed to be used by extensions API, but has no
actual references. This CL removes it and helper methods used only for
its implementation.
Bug: none
Chromium change:
https://chromium.googlesource.com/chromium/src/+/e50090022955b19092d8f7f63d0bf71a8f064428
commit e50090022955b19092d8f7f63d0bf71a8f064428
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Wed Aug 31 13:36:39 2022 +0000
[sync] Move remaining test code to components/sync/test/
Exact same considerations as in crrev.com/c/3822919. We leave a
components/sync/driver/mock_sync_service.h around including the new
components/sync/test/mock_sync_service.h because downstream code is
including the former. After migrating downstream, the old header
can be removed.
Bug: 948661
This change corrects the constructors of several classes under
browser/, using clang-tidy's modernize-use-equals-default. Additionally,
this commit includes a few additional straggler files.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/bb4382b7d2f921014b5d06d8887a37536787f5e0
commit bb4382b7d2f921014b5d06d8887a37536787f5e0
Author: Gabriel Charette <gab@chromium.org>
Date: Mon May 2 13:54:40 2022 +0000
[base] Remove base/android dependency on post_task.h
and officially remove post_task.h!
task_runner_android.cc now holds the bulk of the logic to interface
directly with TaskExecutors via TaskTraitsExtensions.
post_task_android.cc just forwards to a BASE TaskRunner.
This is vastly overkill for what this is doing at this point.
Follow-up cleanups will:
- cleanup TaskExtensionsStorage (which is mostly just carrying a
TaskType byte, the extension id being unused at this point)
- cleanup TaskExecutor (don't need to allow multiple registrations)
- and ultimately ideally have an Android equivalent to directly
call content::GetUIThreadTaskRunner() and rid of this indirection
altogether.
Bug: 1026641
Follow the lead of upstream and rewrite most raw pointers to using
raw_ptr<T> instead, making also sure that they are initialized.
This rewrite affected all *.h and *.cc files in this repository
except those from the ios/, third_party/ and vendor/ directories,
and it didn't touch any *.mm file either.
Regular expression used for the search & replace process:
Find regexp: "^\s*?(\S*?)\* (\S*?[a-zA-Z0-9]_?);"
Replace with: "raw_ptr<$1> $2 = nullptr;"
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/0e45c020c43b1a9f6d2870ff7f92b30a2f03a458
commit 0e45c020c43b1a9f6d2870ff7f92b30a2f03a458
Author: Keishi Hattori <keishi@chromium.org>
Date: Sat Nov 27 09:25:52 2021 +0000
Rewrite most `Foo* field_` pointer fields to `raw_ptr<Foo> field_`.
DO NOT REVERT (unless absolutely necessary)! Report build breaks to keishi@(APAC)/glazunov@(EMEA /sebmarchand@(NA) as soon as you see them. Fixes are expected to be trivial.
This commit was generated automatically, by running the following script: tools/clang/rewrite_ra _ptr_fields/rewrite-multiple-platforms.sh on commit fe74bc434e5b7e92d13a328362fcb6df15d8847e
For more information, see MiraclePtr One Pager [1], the PSA at chromium-dev@ [2], and the raw_pt documentation in //base/memory/raw_ptr.md.
FYI This CL does not enable MiraclePtr protection and we expect no behavior change from this.
[1] https://docs.google.com/document/d/1pnnOAIz_DMWDI4oIOFoMAqLnf_MZ2GsrJNb_dbQ3ZBg/edit?usp=sha ing
[2] https://groups.google.com/a/chromium.org/g/chromium-dev/c/vAEeVifyf78/m/SkBUc6PhBAAJ
Bug: 1272324, 1073933
No need to use the templated syntax anymore.
Chromium change:
https://source.chromium.org/chromium/chromium/src/+/e0fc463ca6d8dedd64bb520779aa367c0831581b
commit e0fc463ca6d8dedd64bb520779aa367c0831581b
Author: Daniel Cheng <dcheng@chromium.org>
Date: Fri Oct 1 00:37:41 2021 +0000
Update base::DoNothing() / base::NullCallback() to use a type tag.
This allows both helpers to be used in contexts where the original
helper required templated arguments to be explicitly specified,
generally leading to more concise code.
However, since base::DoNothing() only returns a type tag now, it can no
longer be used as a functor with base::BindOnce/base::BindRepeating.
In general, this seems to be a net neutral to slight positive change:
the lambda version is actually shorter—though some might argue less
readable—and it generates more efficient code since running the callback
now jumps through one less thunk.
Bug: 1252980
Chromium change:
https://chromium.googlesource.com/chromium/src/+/21667acc2a3c5fe6738899fb494248c583bcc230
Rename ProfileSyncService to SyncServiceImpl in Android code
No behavior is changed. Do the following renamings:
- ProfileSyncService.java -> SyncServiceImpl.java
- profile_sync_service_android.h -> sync_service_android_bridge.h
- FakeProfileSyncService.java -> FakeSyncServiceImpl.java (and
corresponding *WithFakeProfileSyncService test files)
Moreover
- Update the documentation of *sync_service_android_bridge.h
Bug: 1201272
Chromium change:
https://chromium.googlesource.com/chromium/src/+/d8ef96e6b8d1de5c4441c8b7df1dab8ef9142290
Remove ProfileSyncServiceAndroid::Init()
This method is basically a way to check whether the native
ProfileSyncService is null. If so, JNI_ProfileSyncService_Init()
destroys ProfileSyncServiceAndroid immediately.
Instead, let's check first and then construct the object if PSS is
non-null. ProfileSyncServiceAndroid now only has 2 deps (the native and
java services), both set on construction.
The CL also does some minor readability improvements to
profile_sync_service_android.cc.
Bug: None
They are in components/sync/driver/sync_service_impl.{cc,h} now.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/b77854267a62e9208b1ac5ceb4167387ec7c56cc
commit b77854267a62e9208b1ac5ceb4167387ec7c56cc
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Fri Jun 4 09:15:21 2021 +0000
Reland "Rename ProfileSyncService to SyncServiceImpl"
Reason for reland: Original CL was reverted to unwind other changes.
Original change's description:
> Rename ProfileSyncService to SyncServiceImpl
>
> Renaming related classes like ProfileSyncServiceAndroid and
> ProfileSyncServiceHarness is left for next CLs. We also use this CL as
> an opportunity to hide the implementation class when possible:
> - Some includes for sync_service_impl.h are removed if unnecessary, or
> replaced with sync_service.h.
> - Even comments referring to SyncServiceImpl are updated to refer to
> the interface if the layer isn't aware SyncServiceImpl is being used.
>
> The CL also adds one missing include for <string> in
> fake_server_helper_android.cc to address one IWYU presubmit warning.
Bug: 1201272
It's chrome/browser/sync/sync_service_factory.cc now.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/ff4e5f6e2d335450d95d29be8496d2f65471a3d2
commit ff4e5f6e2d335450d95d29be8496d2f65471a3d2
Author: Victor Hugo Vianna Silva <victorvianna@google.com>
Date: Tue Jun 1 20:12:14 2021 +0000
Rename chrome/'s ProfileSyncServiceFactory to SyncServiceFactory
The goal of this factory is to return a SyncService. This follows
the naming convention of other keyed services that have an abstract
interface.
Bug: 1201272
base::ScopedObserver is being deprecated on Chromium 93, so we need
to migrate to either ScopedObservation or ScopedMultiSourceObservation
depending on whether one or multiple sources are being observed.
Chromium change:
https://chromium.googlesource.com/chromium/src/+/3a35c513e236f28ba817b6667c9c973163241ebd
commit 3a35c513e236f28ba817b6667c9c973163241ebd
Author: Sigurdur Asgeirsson <siggi@chromium.org>
Date: Thu Jun 3 16:34:54 2021 +0000
Remove redundant base/scoped_observer.h includes.
ScopedObserver is being deprecated in favor of two new classes:
- base::ScopedObservation for observers that only ever observe
a single source.
- base::ScopedMultiSourceObservation for observers that do or may
observe more than a single source.
Bug: 1145565
Resolves https://github.com/brave/brave-browser/issues/16371
Component //brave/*
ERROR at //brave/browser/sync/brave_profile_sync_service_delegate.cc:13:11: Include not allowed.
^-----------------------------------------------------
It is not in any dependency of
//brave/browser/sync:sync
The include file is in the target(s):
//chrome/browser:browser
which should somehow be reachable.
___________________
ERROR at //brave/browser/sync/brave_profile_sync_service_delegate.cc:14:11: Include not allowed.
^-------------------------------------------------
It is not in any dependency of
//brave/browser/sync:sync
The include file is in the target(s):
//chrome/browser:browser
which should somehow be reachable.
```
inherited from existing file in a target that already had check_includes = false
fix https://github.com/brave/brave-browser/issues/12976