Commit Graph
19 Commits
Author SHA1 Message Date
Mario Sanchez Prada 960e7d6c06 Adapt to using the new form of base::DoNothing()
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
2021-11-02 12:38:04 -04:00
AlexeyBarabash fd59f40899 P3A metric Brave.Sync.Status.2
fixes brave/brave-browser#17862
2021-09-20 19:44:34 +03:00
mkarolin 8ac1f664cf Adapt to relocation of components/sync/driver/profile_sync_service.* II.
Followup to a prior commit that follows upstream and renames
ProfileSyncService to SyncServiceImpl in various class names.
2021-08-18 11:00:03 -04:00
samartnik fafc54defd [Android] SyncService related changes
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
2021-08-18 10:53:08 -04:00
samartnik 29d4b656a9 [Android] Changes for ProfileSyncServiceAndroid
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
2021-08-18 10:43:10 -04:00
Mario Sanchez Prada ad63971f19 Adapt to relocation of components/sync/driver/profile_sync_service.*
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
2021-08-18 10:43:05 -04:00
Mario Sanchez Prada 600b872461 Adapt patch for chrome/browser/sync/profile_sync_service_factory.cc
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
2021-08-18 10:39:55 -04:00
Anthony Tseng 618ac477ab Move brave_sync_devices_android.* to brave_chrome_browser_sources 2021-08-17 16:14:31 -07:00
Mario Sanchez Prada 46ba4a605f Adapt to deprecation of base::ScopedObserver
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
2021-06-14 11:40:40 +02:00
wchen342 0724ac82dc Fix deprecated jni calls 2021-03-12 13:58:52 +02:00
bridiver 09e3f08ba8 remove includes that no longer apply 2021-02-04 23:54:26 -05:00
bridiver 33184ea4d8 ```
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
2020-12-01 15:52:35 -07:00
bridiver 7224cd640c make BraveProfileSyncServiceDelegate compatible with ios 2020-11-30 07:34:51 -05:00
AlexeyBarabash a3273cd075 Fixing deps violation causing linker error on Android x86 2020-11-02 22:01:30 +02:00
AlexeyBarabash 826ba06cbc Use is_self_delete_supported field 2020-10-29 10:35:40 +02:00
AlexeyBarabash 22a55c55f3 Removed delete device complete callback usage, it was empty in anyway 2020-10-29 10:30:16 +02:00
AlexeyBarabash 37a87c827f Allow delete other device only if remote device support that (Desktop)
Allow delete other device only if remote device support that (Android)
2020-10-29 10:30:15 +02:00
AlexeyBarabash 7efc2acee8 Android browser can delete other devices in chain 2020-10-29 10:30:15 +02:00
AlexeyBarabash ef4e4a8c4a Classes for work with sync devices 2020-06-29 17:12:57 +03:00