New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac
Pri: 2
Type: Task

Blocked on:
issue 910518



Sign in to add a comment
link

Issue 884159: Rationalize Sync setup/configuration flow

Reported by treib@chromium.org, Sep 14 Project Member

Issue description

Currently, the flow for setting up or (re)configuring Sync looks something like this:

ProfileSyncService* pss = ...;
1: auto setup_handle = pss->GetSetupInProgressHandle();
2: pss->RequestStart();
3: (Wait for engine to be initialized)
4: pss->OnUserChoseDatatypes(...);
5: pss->SetFirstSetupComplete();
6: setup_handle.reset();

(The flow gets a lot more convoluted when custom passphrase encryption is involved. If it is canceled (only possible during first-time setup I think), then there might be additional calls to RequestStop and/or sign-out).

Aside from being inconvenient and confusing (why are so many not-obviously-connected APIs involved), most of those steps also do multiple things or have gotchas:
1: The setup-in-progress handle prevents later changes from applying immediately, which makes sense. However, this also triggers an immediate startup if Sync isn't already running.
2: Does two things: a) trigger immediate startup (unnecessary because step 1 already did that), and b) clear DISABLE_REASON_USER_CHOICE (which can be set if the user previously disabled Sync (Android only, maybe iOS too?), or if Sync was reset from the dashboard).
4: Immediately stores the new preferred types to prefs.
5: Only required during first-time setup; otherwise it's already set.
6: Releasing the handle lets PSS actually apply all the above changes, *except* if another setup UI happens to be open in another tab.

Doc with more thoughts/details: https://docs.google.com/document/d/1fUnZBR5eiEPOnfVJc6dWNn54TU7r_8Ll0F-GoFcZJ3s
 

Comment 1 by treib@chromium.org, Sep 14

Cross-refs: This is sort of a followup to  bug 854978  (cleaning up SetupInProgress) and related to  bug 839834  (cleaning up PSS's interface).

Comment 2 by treib@chromium.org, Sep 14

One related anti-feature that can probably be fixed along the way: Generally, any changes to Sync settings (e.g. preferred data types) get stored to prefs immediately, but actually apply only when you leave the settings page. However, if another chrome://settings/syncSetup tab happens to be open, then Sync will remain in a CONFIGURING state, i.e. Sync won't actually become active again. This is IMO quite unexpected; e.g. it has complicated multiple investigations in the past, because nobody expects that having a settings tab open would change things.

Comment 3 by treib@chromium.org, Sep 14

Proposal (not fully thought through):
Let's get rid of SetupInProgressHandle (and the whole SetupInProgress state), RequestStart/RequestStop, OnUserChoseDatatypes, and SetFirstSetupComplete. Instead, introduce a SyncUserSettings struct and a simple getter+setter for it on the SyncService. The struct could look something like this:

struct SyncUserSettings {
  // Replaces RequestStart/RequestStop and maps to DISABLE_REASON_USER_CHOICE
  enum SyncEnabledSetting {
    ENABLED,
    DISABLED_TEMPORARILY,  // Maps to today's RequestStop(KEEP_DATA)
    DISABLED_PERMANENTLY,  // Maps to today's RequestStop(CLEAR_DATA)
  };
  SyncEnabledSetting enabled;

  // Replaces OnUserChoseDatatypes
  ModelTypeSet preferred_types;

  bool first_setup_complete;
};

SyncService will also need a |NudgeToStart|, which will bypass deferred startup (but do nothing else).

Comment 4 by treib@chromium.org, Sep 14

Description: Show this description

Comment 5 by treib@chromium.org, Oct 8

Another oddity caused by this which I've just discovered: If a Sync settings tab is open during a Chrome restart, then Sync might or might not actually start, depending on whether that tab or the SyncService initializes first.

Comment 6 by treib@chromium.org, Oct 8

Labels: -Pri-3 Pri-2
Upgrading to P2, since this has impeded several bug investigations.

Comment 7 by treib@chromium.org, Oct 16

Owner: treib@chromium.org
Status: Started (was: Available)

Comment 8 by treib@chromium.org, Oct 17

Description: Show this description

Comment 9 by bugdroid1@chromium.org, Oct 18

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4f4311036e62cd2d059573b3ee4688fadb83ec6d

commit 4f4311036e62cd2d059573b3ee4688fadb83ec6d
Author: Marc Treib <treib@chromium.org>
Date: Thu Oct 18 09:41:53 2018

Cleanup: Make SyncServiceCrypto Reset()able

In some circumstances, ProfileSyncService wants to fully reset
SyncServiceCrypto's state. Currently, it destroys and recreated the
whole object. That works, but it's problematic if we want to pass
pointers to the SyncServiceCrypto object elsewhere.
Instead, this CL adds a Reset() method to SyncServiceCrypto. For
convenient implementation, and to make sure *everything* gets reset,
all the mutable state gets wrapped into a new struct.

Bug: 884159
Change-Id: Ia2590301a6236461e4df20d7f83fee5599e5483c
Reviewed-on: https://chromium-review.googlesource.com/c/1286424
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600705}
[modify] https://crrev.com/4f4311036e62cd2d059573b3ee4688fadb83ec6d/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/4f4311036e62cd2d059573b3ee4688fadb83ec6d/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/4f4311036e62cd2d059573b3ee4688fadb83ec6d/components/sync/driver/sync_service_crypto.cc
[modify] https://crrev.com/4f4311036e62cd2d059573b3ee4688fadb83ec6d/components/sync/driver/sync_service_crypto.h

Comment 10 by bugdroid1@chromium.org, Oct 23

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

commit a238f8b984a1b09449ae92abd23f32576d098c96
Author: Marc Treib <treib@chromium.org>
Date: Tue Oct 23 10:23:08 2018

Sync: Reconfigure whenever a SyncSetupInProgressHandle is released

Before: Reconfigure Sync only when the *last* handle is released.
After: Reconfigure Sync whenever a handle is released, whether there
are any others or not.

On desktop, this fixes the case where a chrome://settings/syncSetup
tab is left open and forgotten somewhere, which previously prevented
Sync from ever applying new settings.

On Android/iOS, only one Sync setup UI can be visible at a time, so
this doesn't change any behavior. However, we now need to be careful
not to needlessly re-create the handle.

Bug: 884159
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ib61d063ac8b6e76d05a5b72d17de7b1e031a51dd
Reviewed-on: https://chromium-review.googlesource.com/c/1280208
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601899}
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/chrome/browser/supervised_user/child_accounts/child_account_service.cc
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/chrome/browser/supervised_user/supervised_user_service.cc
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/chrome/browser/sync/profile_sync_service_android.cc
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/a238f8b984a1b09449ae92abd23f32576d098c96/ios/chrome/browser/sync/sync_setup_service.cc

Comment 11 by bugdroid1@chromium.org, Nov 12

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

commit c18387c52baabc0d4f0358276b45a05d7e668e91
Author: Marc Treib <treib@chromium.org>
Date: Mon Nov 12 12:28:06 2018

Introduce SyncUserSettings

This new class encapsulates all the user-configurable bits of Sync.
For now, it is built on top of ProfileSyncService's public API. Further
CLs will migrate callers over to the new class, and then remove the
public ProfileSyncService API.

Bug: 884159
Change-Id: I2c6aa175f46712d408d7b701292390c539399531
Reviewed-on: https://chromium-review.googlesource.com/c/1283689
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607201}
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/browser_sync/BUILD.gn
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/browser_sync/profile_sync_service.h
[add] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/browser_sync/sync_user_settings_impl.cc
[add] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/browser_sync/sync_user_settings_impl.h
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/sync/BUILD.gn
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/sync/driver/sync_service.cc
[modify] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/sync/driver/sync_service.h
[add] https://crrev.com/c18387c52baabc0d4f0358276b45a05d7e668e91/components/sync/driver/sync_user_settings.h

Comment 12 by bugdroid1@chromium.org, Nov 12

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/40da1f32114d3ed520463973da734a48bb08d4db

commit 40da1f32114d3ed520463973da734a48bb08d4db
Author: Marc Treib <treib@chromium.org>
Date: Mon Nov 12 17:13:58 2018

Migrate ProfileSyncServiceAndroid to use SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I876c39d3f69f7d5e8ed3ead1f07660279e283eb0
Reviewed-on: https://chromium-review.googlesource.com/c/1286455
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607279}
[modify] https://crrev.com/40da1f32114d3ed520463973da734a48bb08d4db/chrome/browser/sync/profile_sync_service_android.cc
[modify] https://crrev.com/40da1f32114d3ed520463973da734a48bb08d4db/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/40da1f32114d3ed520463973da734a48bb08d4db/components/browser_sync/profile_sync_service.h

Comment 13 by bugdroid1@chromium.org, Nov 13

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

commit a785431019d0dae45c45d9c6bf62b7a258a7b6f0
Author: Marc Treib <treib@chromium.org>
Date: Tue Nov 13 09:38:20 2018

Migrate PeopleHandler to use SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I0d689d5a07a17895ddf93463a7896fdf1484b3dd
Reviewed-on: https://chromium-review.googlesource.com/c/1286452
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607533}
[modify] https://crrev.com/a785431019d0dae45c45d9c6bf62b7a258a7b6f0/chrome/browser/ui/webui/settings/people_handler.cc

Comment 14 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/14260f612444ff5e1b5043edb2601c439e6f2ad7

commit 14260f612444ff5e1b5043edb2601c439e6f2ad7
Author: Marc Treib <treib@chromium.org>
Date: Tue Nov 13 13:40:16 2018

Migrate the iOS SyncSetupService to use SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I219dc4d37ecd4a9eac1a7fb40f50b6b0bc2cb88d
Reviewed-on: https://chromium-review.googlesource.com/c/1331402
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607577}
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/signin/authentication_service_unittest.mm
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/sync/sync_setup_service.cc
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/sync/sync_setup_service.h
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/sync/sync_setup_service_factory.cc
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/sync/sync_setup_service_mock.cc
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/sync/sync_setup_service_mock.h
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/ui/recent_tabs/recent_tabs_coordinator_unittest.mm
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller_unittest.mm
[modify] https://crrev.com/14260f612444ff5e1b5043edb2601c439e6f2ad7/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller_unittest.mm

Comment 16 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8f5d676fcd22b50cbe316fbea1f3072a7083948a

commit 8f5d676fcd22b50cbe316fbea1f3072a7083948a
Author: Marc Treib <treib@chromium.org>
Date: Tue Nov 13 16:48:13 2018

Migrate sync_ui_util to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: Iae8ac063b497ba4a74244d73927bc093cb42b57e
Reviewed-on: https://chromium-review.googlesource.com/c/1333387
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607619}
[modify] https://crrev.com/8f5d676fcd22b50cbe316fbea1f3072a7083948a/chrome/browser/sync/sync_ui_util.cc

Comment 17 by bugdroid1@chromium.org, Nov 13

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/45a86ad0b78f2c2951156f402785725fba02bed5

commit 45a86ad0b78f2c2951156f402785725fba02bed5
Author: Marc Treib <treib@chromium.org>
Date: Tue Nov 13 18:06:15 2018

Remove unnecessary constructor of SyncSetupServiceMock

The PrefService isn't required anymore.

Bug: 884159
Change-Id: I6fabe54fe69e56602d8bbbd6134b8cc8acec9e80
Reviewed-on: https://chromium-review.googlesource.com/c/1333773
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607650}
[modify] https://crrev.com/45a86ad0b78f2c2951156f402785725fba02bed5/ios/chrome/browser/sync/sync_setup_service_mock.cc
[modify] https://crrev.com/45a86ad0b78f2c2951156f402785725fba02bed5/ios/chrome/browser/sync/sync_setup_service_mock.h

Comment 18 by bugdroid1@chromium.org, Nov 15

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

commit fac49554f80072e949782d638fe204d37beb66d9
Author: Marc Treib <treib@chromium.org>
Date: Thu Nov 15 07:35:58 2018

Introduce TestSyncUserSettings

It's a simple test implementation of SyncUserSettings that mostly
forwards calls to the TestSyncService. It is not actually used yet, but
it unlocks the migration of tests over to SyncUserSettings.

Bug: 884159
Change-Id: Id9d9c03f639c6523bb6d6592517ba46d1f8f4566
Reviewed-on: https://chromium-review.googlesource.com/c/1335565
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608286}
[modify] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/browser_sync/sync_user_settings_impl.h
[modify] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/BUILD.gn
[modify] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/driver/sync_user_settings.h
[modify] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/driver/test_sync_service.h
[add] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/driver/test_sync_user_settings.cc
[add] https://crrev.com/fac49554f80072e949782d638fe204d37beb66d9/components/sync/driver/test_sync_user_settings.h

Comment 19 by bugdroid1@chromium.org, Nov 15

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

commit e3599d878e6ecf457afad1a14e068e0c37b802b7
Author: Marc Treib <treib@chromium.org>
Date: Thu Nov 15 12:05:34 2018

Migrate UnifiedConsentService + tests to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I27fb6303c8cf201d345c6c578dd80dd2582e1575
Reviewed-on: https://chromium-review.googlesource.com/c/1335595
Reviewed-by: Thomas Tangl <tangltom@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608330}
[modify] https://crrev.com/e3599d878e6ecf457afad1a14e068e0c37b802b7/components/unified_consent/unified_consent_service.cc
[modify] https://crrev.com/e3599d878e6ecf457afad1a14e068e0c37b802b7/components/unified_consent/unified_consent_service_unittest.cc

Comment 20 by bugdroid1@chromium.org, Nov 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9ab642dc09d5aba8fc83c10522a38a32be820c01

commit 9ab642dc09d5aba8fc83c10522a38a32be820c01
Author: Marc Treib <treib@chromium.org>
Date: Thu Nov 15 14:10:54 2018

Migrate ProfileSyncService unit tests to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I31374ece7bf1d6c8b72f8c894e1d9b9a5660d18f
Reviewed-on: https://chromium-review.googlesource.com/c/1337495
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608353}
[modify] https://crrev.com/9ab642dc09d5aba8fc83c10522a38a32be820c01/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/9ab642dc09d5aba8fc83c10522a38a32be820c01/components/browser_sync/profile_sync_service_unittest.cc

Comment 21 by bugdroid1@chromium.org, Nov 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/62be72c6e8556b1fc9b45c961bce64df0fe7c17e

commit 62be72c6e8556b1fc9b45c961bce64df0fe7c17e
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 16 09:54:39 2018

Migrate SyncInternalsMessageHandler to SyncUserSettings

including both the iOS and the non-iOS versions.

Bug: 884159
Change-Id: Ic8b983a5e10cebd2708084937999b7049fcdcb57
Reviewed-on: https://chromium-review.googlesource.com/c/1337507
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608714}
[modify] https://crrev.com/62be72c6e8556b1fc9b45c961bce64df0fe7c17e/chrome/browser/ui/webui/sync_internals_message_handler.cc
[modify] https://crrev.com/62be72c6e8556b1fc9b45c961bce64df0fe7c17e/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc

Comment 22 by bugdroid1@chromium.org, Nov 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/17802b59146799ec734279de61d9039f4c440622

commit 17802b59146799ec734279de61d9039f4c440622
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 16 12:04:24 2018

Migrate Sync integration tests to SyncUserSettings

Bug: 884159
Change-Id: Ibcb7f843551c3e052610d3847b2537ee27a575fb
Reviewed-on: https://chromium-review.googlesource.com/c/1339960
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608736}
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/single_client_app_list_sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/single_client_secondary_account_sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/single_client_standalone_transport_sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/sync_errors_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/chrome/browser/sync/test/integration/two_client_uss_sync_test.cc
[modify] https://crrev.com/17802b59146799ec734279de61d9039f4c440622/components/browser_sync/abstract_profile_sync_service_test.cc

Comment 23 by bugdroid1@chromium.org, Nov 16

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

commit ae89861b0d2f6a79683d7d395c330395be08c890
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 16 12:29:23 2018

Migrate OneClickSigninSyncStarter and DiceTurnSyncOnHelper to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: I329cace9810d0b606b755a39574471516bc21665
Reviewed-on: https://chromium-review.googlesource.com/c/1339870
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608742}
[modify] https://crrev.com/ae89861b0d2f6a79683d7d395c330395be08c890/chrome/browser/ui/sync/one_click_signin_sync_starter.cc
[modify] https://crrev.com/ae89861b0d2f6a79683d7d395c330395be08c890/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper.cc

Comment 24 by bugdroid1@chromium.org, Nov 16

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/58808a999c8b15215e55c50070c5bd854cc8f02b

commit 58808a999c8b15215e55c50070c5bd854cc8f02b
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 16 13:47:54 2018

Sync Android UI: Use GetChosenDataTypes over GetPreferredDataTypes

We were already using SetChosenDataTypes.
Unfortunately, GetPreferredDataTypes must still be exposed to the Java
side because invalidations code needs it.

Bug: 884159
Change-Id: I42745e28a312a3ad0494392d2a283c75fa36b08e
Reviewed-on: https://chromium-review.googlesource.com/c/1339865
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Boris Sazonov <bsazonov@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608754}
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SyncAndServicesPreferences.java
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/SyncCustomizationFragment.java
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/SyncTestRule.java
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/browser/sync/profile_sync_service_android.cc
[modify] https://crrev.com/58808a999c8b15215e55c50070c5bd854cc8f02b/chrome/browser/sync/profile_sync_service_android.h

Comment 25 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/50069dbe55400d8d53c5730671ff42c2db0d8a7a

commit 50069dbe55400d8d53c5730671ff42c2db0d8a7a
Author: Marc Treib <treib@chromium.org>
Date: Mon Nov 19 15:04:39 2018

Improve comments on SyncUserSettings

Some of the settings have surprising default values. As a first step,
let's at least document those.

Bug: 884159, 906034
Change-Id: I8ee8ba2d6ffc2886f8bc623062787d6ec8d332ed
Reviewed-on: https://chromium-review.googlesource.com/c/1340301
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609291}
[modify] https://crrev.com/50069dbe55400d8d53c5730671ff42c2db0d8a7a/components/sync/driver/sync_user_settings.h

Comment 26 by bugdroid1@chromium.org, Nov 19

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b9d7ea273b399b1163b866c12765eff1c39117b

commit 1b9d7ea273b399b1163b866c12765eff1c39117b
Author: Marc Treib <treib@chromium.org>
Date: Mon Nov 19 15:10:28 2018

Migrate SyncAwareCounterTest to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: Ifead457dd109d648285b97217274370d1f25ef36
Reviewed-on: https://chromium-review.googlesource.com/c/1339873
Reviewed-by: Martin Šrámek <msramek@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609292}
[modify] https://crrev.com/1b9d7ea273b399b1163b866c12765eff1c39117b/chrome/browser/browsing_data/counters/sync_aware_counter_browsertest.cc

Comment 27 by bugdroid1@chromium.org, Nov 20

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9948a6890c31e5cefdce93d0d0ed68cff62ca898

commit 9948a6890c31e5cefdce93d0d0ed68cff62ca898
Author: Marc Treib <treib@chromium.org>
Date: Tue Nov 20 08:01:37 2018

Migrate extensions tests to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Bug: 884159
Change-Id: Ic69d65e6f4a2f6e74f8ca0fd3954aaf78b0992fa
Reviewed-on: https://chromium-review.googlesource.com/c/1338100
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609623}
[modify] https://crrev.com/9948a6890c31e5cefdce93d0d0ed68cff62ca898/chrome/browser/extensions/api/browsing_data/browsing_data_test.cc
[modify] https://crrev.com/9948a6890c31e5cefdce93d0d0ed68cff62ca898/chrome/browser/extensions/extension_service_sync_unittest.cc

Comment 28 by bugdroid1@chromium.org, Nov 21

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

commit a96607ac29f88ee9b488ea8317f1ff8705e39425
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 21 09:23:22 2018

Migrate components/password_manager to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

While I'm here, also
- update a comment in GetSyncUsernameIfSyncingPasswords to be more
  specific, since the semantics here are a bit weird, and
- remove a CanSyncFeatureStart check from
  ShouldAffiliationBasedMatchingBeActive since it's redundant with the
  check for IsSyncFeatureActive which is strictly stronger.

Bug: 884159
Change-Id: Ibbb9a82a2d89520e1a349e29a1050cd84dd52ea5
Reviewed-on: https://chromium-review.googlesource.com/c/1344096
Reviewed-by: Vaclav Brozek <vabr@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609964}
[modify] https://crrev.com/a96607ac29f88ee9b488ea8317f1ff8705e39425/chrome/browser/password_manager/chrome_password_manager_client.cc
[modify] https://crrev.com/a96607ac29f88ee9b488ea8317f1ff8705e39425/components/password_manager/core/browser/password_bubble_experiment.cc
[modify] https://crrev.com/a96607ac29f88ee9b488ea8317f1ff8705e39425/components/password_manager/core/browser/password_manager_util.cc
[modify] https://crrev.com/a96607ac29f88ee9b488ea8317f1ff8705e39425/components/password_manager/core/browser/password_store_factory_util.cc
[modify] https://crrev.com/a96607ac29f88ee9b488ea8317f1ff8705e39425/components/password_manager/core/browser/password_sync_util.cc

Comment 29 by bugdroid1@chromium.org, Nov 21

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/725a59b7a069055de7b382b0c8bda26fc2628d80

commit 725a59b7a069055de7b382b0c8bda26fc2628d80
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 21 15:03:04 2018

SearchTabHelper: Add IsSyncFeatureEnabled check to IsHistorySyncEnabled

Previously it just checked GetPreferredDataTypes. This was probably
okay in practice (the check was anyway more of a "has the user not
disabled history sync" rather than "is history sync enabled"), but
still better to be correct.

While we're here, also move to SyncUserSettings, which is the new way
to query any user-configurable bits of Sync.

This also includes a bunch of test cleanup: Removing a Mock class that
isn't used, and using NiceMock to avoid unnecessary chattiness.

Bug:  907027 , 884159
Change-Id: I2a3d0f8ef13a74b51f4b4a2edc19976a61c6c430
Reviewed-on: https://chromium-review.googlesource.com/c/1343087
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#610055}
[modify] https://crrev.com/725a59b7a069055de7b382b0c8bda26fc2628d80/chrome/browser/ui/search/search_tab_helper.cc
[modify] https://crrev.com/725a59b7a069055de7b382b0c8bda26fc2628d80/chrome/browser/ui/search/search_tab_helper_unittest.cc

Comment 30 by bugdroid1@chromium.org, Nov 28

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

commit ba172b7bd956f2f35f5192546055f460b962cf23
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 28 09:20:16 2018

Remove SyncService::RequestStart

It has been replaced by SyncUserSettings::SetSyncRequested(true).
Note that *Profile*SyncService::RequestStart still exists for now
(it's used by SyncUserSettings). This will be changed in a later CL.

Bug: 884159
Change-Id: Ie96e6a999ae6060fd3bbe444e4471ba9327edef8
Reviewed-on: https://chromium-review.googlesource.com/c/1350907
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611609}
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/chrome/browser/sync/test/integration/single_client_standalone_transport_sync_test.cc
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/sync/driver/sync_service.h
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/ba172b7bd956f2f35f5192546055f460b962cf23/components/sync/driver/test_sync_service.h

Comment 31 by bugdroid1@chromium.org, Nov 28

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

commit f9955912e56f4ec6e00a868ca8e321a72e831d89
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 28 11:06:32 2018

Remove SyncService::SetFirstSetupComplete

It has been replaced by SyncUserSettings::SetFirstSetupComplete.
Note that *Profile*SyncService::SetFirstSetupComplete still exists for
now (it's used by SyncUserSettings). This will be changed in a later CL.

Bug: 884159
Change-Id: I0d7b99863b0bf121ff6bf640b6738f156172c084
Reviewed-on: https://chromium-review.googlesource.com/c/1352773
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611646}
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/sync_service.h
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/f9955912e56f4ec6e00a868ca8e321a72e831d89/components/sync/driver/test_sync_user_settings.cc

Comment 32 by bugdroid1@chromium.org, Nov 28

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/617a8563d6b9a1bee6113d8ba35e4806f99593ac

commit 617a8563d6b9a1bee6113d8ba35e4806f99593ac
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 28 16:14:45 2018

Remove SyncService::OnUserChoseDatatypes

It has been replaced by SyncUserSettings::SetChosenDataTypes.
Note that *Profile*SyncService::OnUserChoseDatatypes still exists for
now (it's used by SyncUserSettings). This will be changed in a later CL.

This required a minor change in unified_consent_service_unittest.cc:
This test's implementation of TestSyncService used to override
OnUserChoseDatatypes. This logic is now moved (in slightly generalized
form) into TestSyncUserSettings.

Bug: 884159
Change-Id: I6723543f78a3f8c42f9bc29a9da84376ad92126b
Reviewed-on: https://chromium-review.googlesource.com/c/1353878
Reviewed-by: Thomas Tangl <tangltom@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611721}
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/sync_service.h
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/sync/driver/test_sync_user_settings.cc
[modify] https://crrev.com/617a8563d6b9a1bee6113d8ba35e4806f99593ac/components/unified_consent/unified_consent_service_unittest.cc

Comment 33 by bugdroid1@chromium.org, Nov 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3accf29c070e9bfd532a3a80b78945702c654b4b

commit 3accf29c070e9bfd532a3a80b78945702c654b4b
Author: Marc Treib <treib@chromium.org>
Date: Thu Nov 29 07:45:48 2018

Remove SyncService::IsFirstSetupComplete

It has been replaced by SyncUserSettings::IsFirstSetupComplete.
Note that *Profile*SyncService::IsFirstSetupComplete still exists for
now (it's used by SyncUserSettings). This will be changed in a later CL.

There were 3 remaining places that still used the SyncService version
of IsFirstSetupComplete; those are trivially migrated to
SyncUserSettings.

Bug: 884159
Change-Id: I90b29436986a7220803c61e2f2767c620e291e71
Reviewed-on: https://chromium-review.googlesource.com/c/1352785
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612091}
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/chrome/browser/sync_file_system/sync_file_system_service.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/browsing_data/core/counters/autofill_counter.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/about_sync_util.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/sync_service.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/sync_service.h
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/test_sync_user_settings.cc
[modify] https://crrev.com/3accf29c070e9bfd532a3a80b78945702c654b4b/components/sync/driver/test_sync_user_settings.h

Comment 34 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9457a567cb17e9d93675f3f42b5d25bea22d0d59

commit 9457a567cb17e9d93675f3f42b5d25bea22d0d59
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 30 13:14:57 2018

Simplify ProfileSyncService::IsSyncConfirmationNeeded

This removes checks for !IsLocalSyncEnabled() and IsSignedIn(), which
are implied by IsAuthenticatedAccountPrimary().
With this, IsSyncConfirmationNeeded is implemented fully in terms of
the public SyncService interface, which means we'll be able to move it
out of ProfileSyncService in a followup.

Bug: 884159
Change-Id: I532065b4517e2156c32b8eb91bf613ba23c4a267
Reviewed-on: https://chromium-review.googlesource.com/c/1356543
Reviewed-by: Florian Uunk <feuunk@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612626}
[modify] https://crrev.com/9457a567cb17e9d93675f3f42b5d25bea22d0d59/components/browser_sync/profile_sync_service.cc

Comment 35 by bugdroid1@chromium.org, Nov 30

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

commit fd0c4fe8584b5af3272d72ed4c6a6973064e3b81
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 30 13:28:04 2018

Remove SyncService::RequestStop

RequestStop(KEEP_DATA) has been replaced by
SyncUserSettings::SetSyncRequested(false). RequestStop(CLEAR_DATA) is
being replaced in this CL by a new StopAndClear().

Bug: 884159
Change-Id: I0d94ee4e834114c062c79bfc10c188276cc294d8
Reviewed-on: https://chromium-review.googlesource.com/c/1353944
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Demetrios Papadopoulos <dpapad@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612628}
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/sync/test/integration/single_client_directory_sync_test.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/ui/webui/settings/people_handler.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/ui/webui/settings/people_handler_unittest.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/chrome/browser/ui/webui/sync_internals_message_handler.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/sync/driver/sync_service.h
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/ios/chrome/browser/signin/authentication_service.mm
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/ios/chrome/browser/signin/authentication_service_unittest.mm
[modify] https://crrev.com/fd0c4fe8584b5af3272d72ed4c6a6973064e3b81/ios/chrome/browser/ui/webui/sync_internals/sync_internals_message_handler.cc

Comment 36 by bugdroid1@chromium.org, Nov 30

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1cb780e4aa78d8e59f0071998cdfc40cb9ced91b

commit 1cb780e4aa78d8e59f0071998cdfc40cb9ced91b
Author: Marc Treib <treib@chromium.org>
Date: Fri Nov 30 14:05:16 2018

Make ProfileSyncService::IsSyncConfirmationNeeded non-virtual

...and update the tests that depended on overriding it.

Bug: 884159
Change-Id: Iac892550720e19ee5d334f0598413b7e225b8338
Reviewed-on: https://chromium-review.googlesource.com/c/1356704
Reviewed-by: Florian Uunk <feuunk@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612635}
[modify] https://crrev.com/1cb780e4aa78d8e59f0071998cdfc40cb9ced91b/chrome/browser/sync/sync_ui_util_unittest.cc
[modify] https://crrev.com/1cb780e4aa78d8e59f0071998cdfc40cb9ced91b/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/1cb780e4aa78d8e59f0071998cdfc40cb9ced91b/components/browser_sync/profile_sync_service_mock.h

Comment 37 by bugdroid1@chromium.org, Dec 3

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8ed7a27a3472ea6531a4b229b21540470ce22f8a

commit 8ed7a27a3472ea6531a4b229b21540470ce22f8a
Author: Marc Treib <treib@chromium.org>
Date: Mon Dec 03 15:43:37 2018

Move IsSyncConfirmationNeeded out of ProfileSyncService

...and into sync_ui_util, where it belongs.
This means that some ProfileSyncService unit tests can't verify it
anymore because it now lives in chrome/browser, but that seems okay
(it's still tested in sync_ui_util_unittest.cc).

Also use this chance to rename it to ShouldShowSyncConfirmation, which
better describes what it means.

Bug: 884159
Change-Id: I14149544d353491ace0590a530e65d0d7687d09f
Reviewed-on: https://chromium-review.googlesource.com/c/1356705
Reviewed-by: Florian Uunk <feuunk@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613095}
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/chrome/browser/sync/sync_ui_util.cc
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/chrome/browser/sync/sync_ui_util.h
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/chrome/browser/sync/sync_ui_util_unittest.cc
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/chrome/browser/ui/avatar_button_error_controller.cc
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/8ed7a27a3472ea6531a4b229b21540470ce22f8a/components/browser_sync/profile_sync_service_unittest.cc

Comment 38 by bugdroid1@chromium.org, Dec 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6b7b7ff9e02938d7e95f182bbdc22cebe5a7930a

commit 6b7b7ff9e02938d7e95f182bbdc22cebe5a7930a
Author: Marc Treib <treib@chromium.org>
Date: Tue Dec 04 09:10:28 2018

Migrate UkmBrowserTests to SyncUserSettings

SyncUserSettings is a new class that encapsulates all the
user-configurable knobs for Sync. It replaces a bunch of setters
and getters directly on the SyncService.

Here, a bunch of calls to RequestStart and RequestStop are replaced by
GetUserSettings()->SetSyncRequested(bool).
SetSyncRequested(false) is equivalent to RequestStop(KEEP_DATA), but
it is also used to replace a bunch of RequestStop(CLEAR_DATA) calls.
However:
- These calls are all at the end of a test, so it doesn't matter if
  data is kept or not. (In fact, these calls actually aren't necessary
  at all, but for some reason, without them the test shutdown takes
  much longer. See also https://crrev.com/c/557422).
- RequestStop(CLEAR_DATA) is generally a pretty weird thing to do:
  Usually it only happens if the user signs out (removes the primary
  account); it ~never needs to be called directly. So this change makes
  the tests a bit less weird / more realistic.

Bug: 884159
Change-Id: I0e2347bbabdeb10846528fe03732a05ba996f43f
Reviewed-on: https://chromium-review.googlesource.com/c/1352180
Reviewed-by: Robert Kaplow <rkaplow@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613477}
[modify] https://crrev.com/6b7b7ff9e02938d7e95f182bbdc22cebe5a7930a/chrome/browser/metrics/ukm_browsertest.cc

Comment 39 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/896c41763e63f6dbdeea251863cda797d3d23910

commit 896c41763e63f6dbdeea251863cda797d3d23910
Author: Marc Treib <treib@chromium.org>
Date: Wed Dec 05 08:19:27 2018

Stop using ProfileSyncService::RequestStop in tests

These were the last usages outside of SyncUserSettingsImpl and
ProfileSyncService itself.

Bug: 884159
Change-Id: I5a7a442f0c0fcea08f520601f8ead83f620ad4df
Reviewed-on: https://chromium-review.googlesource.com/c/1360635
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613905}
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/enable_disable_test.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/profile_sync_service_harness.h
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/sync_test.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/two_client_polling_sync_test.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/chrome/browser/sync/test/integration/two_client_printers_sync_test.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/896c41763e63f6dbdeea251863cda797d3d23910/components/sync/driver/sync_service.h

Comment 40 by bugdroid1@chromium.org, Dec 5

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41b306b38a7e8b5f28add0dfb5670190a3c05862

commit 41b306b38a7e8b5f28add0dfb5670190a3c05862
Author: Marc Treib <treib@chromium.org>
Date: Wed Dec 05 09:28:25 2018

sync_ui_util: Use SyncService rather than ProfileSyncService

Generally, everything should use the interface (SyncService) rather than
the concrete implementation (ProfileSyncService). In particular, this
will make it easier to write tests for this code, since they can now use
TestSyncService instead of ProfileSyncServiceMock.

Bug: 884159, 910518
Change-Id: I794e0af45b4fc576536265cbc049358d37196cbd
Reviewed-on: https://chromium-review.googlesource.com/c/1357087
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613916}
[modify] https://crrev.com/41b306b38a7e8b5f28add0dfb5670190a3c05862/chrome/browser/browsing_data/counters/browsing_data_counter_utils.cc
[modify] https://crrev.com/41b306b38a7e8b5f28add0dfb5670190a3c05862/chrome/browser/extensions/api/browsing_data/browsing_data_api.cc
[modify] https://crrev.com/41b306b38a7e8b5f28add0dfb5670190a3c05862/chrome/browser/sync/sync_ui_util.cc
[modify] https://crrev.com/41b306b38a7e8b5f28add0dfb5670190a3c05862/chrome/browser/sync/sync_ui_util.h

Comment 41 by bugdroid1@chromium.org, Dec 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49f80a482f5f426a03c09bc262dd9d645a008223

commit 49f80a482f5f426a03c09bc262dd9d645a008223
Author: Marc Treib <treib@chromium.org>
Date: Fri Dec 07 12:26:39 2018

Sync: Expose GetRegistered/ForcedDataTypes in SyncService

Previously, GetRegisteredDataTypes and GetForcedDataTypes were only
exposed from the (concrete) ProfileSyncService, not from the (interface)
SyncService, as opposed to GetPreferredDataTypes and GetActiveDataTypes.
It seems right and sensible to expose the registered and forced data
types too.
Concretely, this will allow us to write more code (e.g. PeopleHandler)
in terms of SyncService rather than ProfileSyncService.

Bug: 884159, 910518
Change-Id: I1d9176d4d2ced1dc5defda1b85b6ced2fa51afba
Reviewed-on: https://chromium-review.googlesource.com/c/1365594
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614676}
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/sync/driver/sync_service.h
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/49f80a482f5f426a03c09bc262dd9d645a008223/components/sync/driver/test_sync_service.h

Comment 42 by treib@google.com, Dec 7

Blockedon: 910518
Some of the required changes here turned out harder than anticipated, because several tests rely on ProfileSyncServiceMock (and e.g. have EXPECT_CALLs on methods that are going away).

Comment 43 by bugdroid1@chromium.org, Dec 7

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/580d70169875ae0eb00afacafeba7e8dd5bfbeb3

commit 580d70169875ae0eb00afacafeba7e8dd5bfbeb3
Author: Marc Treib <treib@chromium.org>
Date: Fri Dec 07 13:53:04 2018

Move ProfileSyncService::SyncEvent out of ProfileSyncService

and into sync_service_utils.h/cc.
It was already a static function, so easy to move.
Generally, clients should not use (or even have to know about) the
concrete *Profile*SyncService. This also cleans up its interface a bit.

TBRing simple call site updates:
tangltom for profile_chooser_view.cc
dpapad for people_handler.cc
TBR=tangltom,dpapad

Bug: 884159
Change-Id: Id32e943a083d3cb851766171a3d1cfb3f9282ee4
Reviewed-on: https://chromium-review.googlesource.com/c/1367604
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#614686}
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/chrome/browser/ui/views/profiles/profile_chooser_view.cc
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/chrome/browser/ui/webui/settings/people_handler.cc
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/components/sync/driver/sync_service_utils.cc
[modify] https://crrev.com/580d70169875ae0eb00afacafeba7e8dd5bfbeb3/components/sync/driver/sync_service_utils.h

Comment 44 Deleted

Comment 45 by bugdroid1@chromium.org, Dec 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5f08cf10408a2f9a608eb076cdabb23149c224d8

commit 5f08cf10408a2f9a608eb076cdabb23149c224d8
Author: Marc Treib <treib@chromium.org>
Date: Fri Dec 14 09:01:02 2018

Introduce SyncUserSettingsMock

It's used in ProfileSyncServiceMock. This lets tests specify
expectations or default return values for user settings, which will
eventually let us get rid of the corresponding methods on
ProfileSyncService itself.

Bug: 884159
Change-Id: I58133291208a288d3766b5142da37e12e84c9baa
Reviewed-on: https://chromium-review.googlesource.com/c/1373690
Reviewed-by: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Reviewed-by: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#616615}
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/chrome/browser/password_manager/chrome_password_manager_client_unittest.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/chrome/browser/ui/search/search_tab_helper_unittest.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/chrome/browser/ui/webui/settings/people_handler_unittest.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/chrome/browser/ui/webui/signin/dice_turn_sync_on_helper_unittest.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/BUILD.gn
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/profile_sync_service_mock.h
[add] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/sync_user_settings_mock.cc
[add] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/components/browser_sync/sync_user_settings_mock.h
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/signin/authentication_service_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/clear_browsing_data_collection_view_controller_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/passphrase_collection_view_controller_test.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/sync_create_passphrase_collection_view_controller_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/sync_encryption_passphrase_collection_view_controller_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/sync_encryption_table_view_controller_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller_unittest.mm
[modify] https://crrev.com/5f08cf10408a2f9a608eb076cdabb23149c224d8/ios/web_view/internal/sync/cwv_sync_controller_unittest.mm

Comment 46 by bugdroid1@chromium.org, Dec 17

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/459a99beff59024365a1df84bf390f213255605b

commit 459a99beff59024365a1df84bf390f213255605b
Author: Marc Treib <treib@chromium.org>
Date: Mon Dec 17 09:20:41 2018

SyncUserSettings: Read/write FirstSetupComplete directly from/to prefs

Effectively, this moves the source of truth for this bit from
ProfileSyncService to SyncUserSettings, where it belongs.
ProfileSyncService now listens for changes to the pref value and reacts
accordingly.

Bug: 884159
Change-Id: Id8a8429aecf8854438ead8fbbd32ac6a26e951b6
Reviewed-on: https://chromium-review.googlesource.com/c/1355120
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Dan Beam <dbeam@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#617068}
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/chrome/browser/ui/sync/one_click_signin_sync_observer_unittest.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/sync/base/sync_prefs.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/sync/base/sync_prefs.h
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/sync/base/sync_prefs_unittest.cc
[modify] https://crrev.com/459a99beff59024365a1df84bf390f213255605b/components/sync/driver/fake_sync_client.cc

Comment 47 by bugdroid1@chromium.org, Jan 9

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

commit ab0f5309ad035c877bbac0d29f72c38d5cd5577f
Author: Marc Treib <treib@chromium.org>
Date: Wed Jan 09 10:31:20 2019

Make ProfileSyncService::IsFirstSetupComplete private and non-virtual

SyncUserSettings::IsFirstSetupComplete is the new way to check this.
This also switches the last few call sites of PSS::IFSC over to the new
way.

Bug: 884159
Change-Id: Ie3cf1ac36aee82b1f728c604ad86a381f9d78df0
Reviewed-on: https://chromium-review.googlesource.com/c/1382449
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Yury Khmel <khmel@chromium.org>
Reviewed-by: Karan Bhatia <karandeepb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621103}
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/extensions/external_pref_loader.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/extensions/external_pref_loader_unittest.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/supervised_user/child_accounts/child_account_service.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/ui/app_list/app_sync_ui_state.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/chrome/browser/ui/passwords/manage_passwords_view_utils.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/ab0f5309ad035c877bbac0d29f72c38d5cd5577f/components/browser_sync/profile_sync_service_mock.h

Comment 48 by bugdroid1@chromium.org, Jan 9

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

commit f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa
Author: Marc Treib <treib@chromium.org>
Date: Wed Jan 09 16:14:26 2019

Merge SyncPrefs::SetKeepEverythingSynced and SetPreferredDataTypes

In practice (outside of tests), these two are always called together,
and setting them individually is a bit weird/misleading at best. So
let's merge them into one setter.

This will ease some coming refactorings (see bug), and it is also
more consistent with GetPreferredDataTypes, which respects the
sync_everything bit already.

Bug: 884159
Change-Id: I1b0fa0ccceb874c17703e1f4ceda7b895a5d7969
Reviewed-on: https://chromium-review.googlesource.com/c/1402784
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621163}
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/sync/base/sync_prefs.cc
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/sync/base/sync_prefs.h
[modify] https://crrev.com/f0a80f388730ce083c3f7746ed5f8dc89ee8d8aa/components/sync/base/sync_prefs_unittest.cc

Comment 49 by bugdroid1@chromium.org, Jan 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/38406a29e48621749daf6a3e57d5ea0939748fc9

commit 38406a29e48621749daf6a3e57d5ea0939748fc9
Author: Marc Treib <treib@chromium.org>
Date: Mon Jan 14 09:21:09 2019

Move source of truth for GetPreferred/ChosenDataTypes to SyncUserSettings

Bug: 884159
Change-Id: I1f9e743cfc364aacafe62b13c2ffa2582c49d418
Reviewed-on: https://chromium-review.googlesource.com/c/1382483
Reviewed-by: calamity <calamity@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622400}
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/chrome/browser/ui/webui/browsing_history_handler_unittest.cc
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/abstract_profile_sync_service_test.cc
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/38406a29e48621749daf6a3e57d5ea0939748fc9/components/browser_sync/sync_user_settings_impl.h

Comment 50 by bugdroid1@chromium.org, Jan 14

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c4d342f60b9bb03a0368e886037e1146f020810

commit 9c4d342f60b9bb03a0368e886037e1146f020810
Author: Marc Treib <treib@chromium.org>
Date: Mon Jan 14 11:35:51 2019

Move source of truth for SetPreferredDataTypes to SyncUserSettings

This is a followup to https://crrev.com/c/1382483 which did the same
for the getters.

Bug: 884159
Change-Id: I86e5f98434e20f3ff660065f3d8873e2e2e5e81c
Reviewed-on: https://chromium-review.googlesource.com/c/1403131
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622423}
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/browser_sync/profile_sync_service_startup_unittest.cc
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/sync/base/sync_prefs.cc
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/sync/base/sync_prefs.h
[modify] https://crrev.com/9c4d342f60b9bb03a0368e886037e1146f020810/components/sync/base/sync_prefs_unittest.cc

Comment 51 by bugdroid1@chromium.org, Jan 15

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

commit a3d3dcaba84b52c1ad798a4ed3137c33a5cf5bc6
Author: Marc Treib <treib@chromium.org>
Date: Tue Jan 15 07:35:17 2019

Cleanup in ProfileSyncService::RequestStart

Previously, RequestStart would early-out (*before* actually setting the
SyncRequested pref) if there was a disable reason ENTERPRISE_POLICY or
PLATFORM_OVERRIDE. However, there's no reason for such a constraint,
and it's not enforced consistently anyway (e.g. if SyncRequested is
already set when DISABLE_REASON_ENTERPRISE_POLICY comes in, it's not
cleared).

This CL changes the method to always set SyncRequested. This makes
things a bit simpler, and it should make no actual difference in
practice: If there are other reasons to keep Sync disabled, then those
will still prevent it from starting (checked in ShouldStartEngine).

Bug: 884159
Change-Id: Ib97da48203f3880a8c5366de783a06eee15f62dd
Reviewed-on: https://chromium-review.googlesource.com/c/1404269
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622765}
[modify] https://crrev.com/a3d3dcaba84b52c1ad798a4ed3137c33a5cf5bc6/components/browser_sync/profile_sync_service.cc

Comment 52 by bugdroid1@chromium.org, Jan 15

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9fb67e42bd8cf363b1941aadcd0c3264207b508a

commit 9fb67e42bd8cf363b1941aadcd0c3264207b508a
Author: Marc Treib <treib@chromium.org>
Date: Tue Jan 15 07:35:36 2019

Move source of truth for IsSyncRequested to SyncUserSettings

Bug: 884159
Change-Id: Ib7e45514652a2bd529d116b10138037e8f11d72c
Reviewed-on: https://chromium-review.googlesource.com/c/1409197
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622766}
[modify] https://crrev.com/9fb67e42bd8cf363b1941aadcd0c3264207b508a/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/9fb67e42bd8cf363b1941aadcd0c3264207b508a/components/browser_sync/sync_user_settings_impl.cc

Comment 53 by bugdroid1@chromium.org, Jan 16

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

commit b982d03aea7157c8f0cfbf44e99c72c2b614e16e
Author: Marc Treib <treib@chromium.org>
Date: Wed Jan 16 15:17:32 2019

Move source of truth for SetSyncRequested to SyncUserSettings

This also lets us remove ProfileSyncService::RequestStart/Stop.
(RequestStop is now identical to StopImpl, and RequestStart can be
easily inlined at the call sites.)

Bug: 884159
Change-Id: I03ca6040e444d351a5fe554adba0f0e685abc768
Reviewed-on: https://chromium-review.googlesource.com/c/1412031
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623241}
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs.h
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs_unittest.cc

Comment 54 by bugdroid1@chromium.org, Jan 16

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

commit b982d03aea7157c8f0cfbf44e99c72c2b614e16e
Author: Marc Treib <treib@chromium.org>
Date: Wed Jan 16 15:17:32 2019

Move source of truth for SetSyncRequested to SyncUserSettings

This also lets us remove ProfileSyncService::RequestStart/Stop.
(RequestStop is now identical to StopImpl, and RequestStart can be
easily inlined at the call sites.)

Bug: 884159
Change-Id: I03ca6040e444d351a5fe554adba0f0e685abc768
Reviewed-on: https://chromium-review.googlesource.com/c/1412031
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623241}
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs.cc
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs.h
[modify] https://crrev.com/b982d03aea7157c8f0cfbf44e99c72c2b614e16e/components/sync/base/sync_prefs_unittest.cc

Comment 55 by bugdroid1@chromium.org, Jan 17

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

commit eb4590f091a4d74fc39e54342b1a0dcb9422713d
Author: Marc Treib <treib@chromium.org>
Date: Thu Jan 17 10:47:54 2019

Move source of truth for crypto-related settings to SyncUserSettings

With this change, SyncUserSettingsImpl doesn't need to know about
ProfileSyncService anymore, thus resolving a circular dependency.

Also, most public methods around encryption can now be removed from
SyncService, but that's left as a followup.

Bug: 884159
Change-Id: Ie7aa397ae2e9467a43372061f5199e62d922a7a1
Reviewed-on: https://chromium-review.googlesource.com/c/1414941
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623637}
[modify] https://crrev.com/eb4590f091a4d74fc39e54342b1a0dcb9422713d/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/eb4590f091a4d74fc39e54342b1a0dcb9422713d/components/browser_sync/sync_user_settings_impl.cc
[modify] https://crrev.com/eb4590f091a4d74fc39e54342b1a0dcb9422713d/components/browser_sync/sync_user_settings_impl.h

Comment 56 by bugdroid1@chromium.org, Jan 21

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

commit d809375e4779c80138b32030510c9d3c9c3feb4a
Author: Marc Treib <treib@chromium.org>
Date: Mon Jan 21 09:24:41 2019

Remove many encryption-related methods from [Profile]SyncService

All the methods that are more (static) configuration than (dynamic)
runtime state should be exposed and accessed via SyncUserSettings.

Some methods are more like runtime state, e.g.
IsUsingSecondaryPassphrase (since we know the answer to that only if
the Sync engine is running). Those will remain in SyncService.

For yet some other methods, it's not entirely clear where they should
live, e.g. IsPassphraseRequired. For now, these are left alone.

Some code (mostly tests) is updated to refer to the removed methods
via SyncUserSettings instead of via the SyncService.

Bug: 884159
Change-Id: I42b0aa632945238b4493794da1a8ecf6c6f01a33
Reviewed-on: https://chromium-review.googlesource.com/c/1417472
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#624539}
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/chromeos/extensions/input_method_api.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/metrics/ukm_browsertest.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/supervised_user/supervised_user_service.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/single_client_custom_passphrase_sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/single_client_passwords_sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/chrome/browser/sync/test/integration/two_client_passwords_sync_test.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/history/core/browser/sync/history_delete_directives_data_type_controller.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/history/core/browser/sync/history_delete_directives_model_type_controller.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/about_sync_util.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/sync_service.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/sync_user_settings.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/components/sync/driver/test_sync_user_settings.cc
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/ios/chrome/browser/ui/settings/sync_encryption_passphrase_table_view_controller.mm
[modify] https://crrev.com/d809375e4779c80138b32030510c9d3c9c3feb4a/ios/web_view/internal/sync/cwv_sync_controller.mm

Comment 57 by bugdroid, Jan 24

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1291b1a269064f03009b1bd14cb092dd4b463ba9

commit 1291b1a269064f03009b1bd14cb092dd4b463ba9
Author: Marc Treib <treib@chromium.org>
Date: Thu Jan 24 13:15:38 2019

Update ProfileSyncService class comment

Some things mentioned there had become outdated or obsolete.

Bug: 884159
Change-Id: I53d1e552e5814cae5a58d5b16c3cd51b73676318
Reviewed-on: https://chromium-review.googlesource.com/c/1433238
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625620}

Comment 58 by bugdroid, Jan 24

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/876fa5a4a18d2ef833a83228aa7b54a3dfabb3f3

commit 876fa5a4a18d2ef833a83228aa7b54a3dfabb3f3
Author: Marc Treib <treib@chromium.org>
Date: Thu Jan 24 17:28:08 2019

Improve comments on encryption-related SyncUserSettings methods

(and some related methods elsewhere)

Bug: 884159
Change-Id: I2b87b9fc9302f35e5fd3862035ef84418e5ffac8
Reviewed-on: https://chromium-review.googlesource.com/c/1432844
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Cr-Commit-Position: refs/heads/master@{#625694}

Comment 59 by bugdroid, Jan 29

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1

commit 41ddf6cb234fffdfebba7f1f34f720c3e44d92a1
Author: Marc Treib <treib@chromium.org>
Date: Tue Jan 29 17:29:50 2019

Implement DataTypeEncryptionHandler in SyncUserSettings instead of SyncService

This effectively removes two methods (IsPassphaseRequired and
GetEncryptedDataTypes) from SyncService's public interface.

Bug: 884159
Change-Id: I95e042f4fd4fa3b5930fee00fcf6048f4a72a262
Reviewed-on: https://chromium-review.googlesource.com/c/1436368
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Commit-Queue: David Roger <droger@chromium.org>
Auto-Submit: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627050}
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/sync_user_settings_impl.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/browser_sync/sync_user_settings_mock.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/about_sync_util.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/sync_service.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/sync_service_utils.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/sync_user_settings.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/test_sync_user_settings.cc
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/components/sync/driver/test_sync_user_settings.h
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/ios/chrome/browser/ui/settings/sync_encryption_passphrase_table_view_controller.mm
[modify] https://crrev.com/41ddf6cb234fffdfebba7f1f34f720c3e44d92a1/ios/chrome/browser/ui/settings/sync_settings_collection_view_controller.mm

Comment 60 by bugdroid, Jan 31

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

commit f52a0fc499a559f1921a8ff2ca18508d1427eae3
Author: Marc Treib <treib@chromium.org>
Date: Thu Jan 31 10:11:13 2019

Remove last encryption-related methods from SyncService

This removes IsUsingSecondaryPassphrase and
IsPassphraseRequiredForDecryption from SyncService.
These are now accessed through SyncUserSettings

Bug: 884159
Change-Id: I3aaa6eb20f3d2f6784fc128d671da05bf6b16041
Reviewed-on: https://chromium-review.googlesource.com/c/1437085
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mohamed Amir Yosef <mamir@chromium.org>
Reviewed-by: Christian Dullweber <dullweber@chromium.org>
Reviewed-by: Brian White <bcwhite@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: calamity <calamity@chromium.org>
Cr-Commit-Position: refs/heads/master@{#627880}
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/chrome/browser/sync/test/integration/encryption_helper.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/chrome/browser/sync/test/integration/sync_integration_test_util.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/chrome/browser/sync/test/integration/two_client_custom_passphrase_sync_test.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/chrome/browser/ui/passwords/manage_passwords_bubble_model_unittest.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/autofill/core/browser/autofill_experiments.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/browsing_data/core/history_notice_utils.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/about_sync_util.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/fake_sync_service.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/fake_sync_service.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/sync_service.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/sync_service_utils.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/test_sync_service.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/test_sync_service.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/test_sync_user_settings.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/driver/test_sync_user_settings.h
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/sync/user_events/user_event_service_impl.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/components/ukm/observers/sync_disable_observer.cc
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/ios/chrome/browser/ui/settings/sync/sync_encryption_passphrase_table_view_controller.mm
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/ios/chrome/browser/ui/settings/sync/sync_encryption_table_view_controller.mm
[modify] https://crrev.com/f52a0fc499a559f1921a8ff2ca18508d1427eae3/ios/web_view/internal/sync/cwv_sync_controller.mm

Comment 61 by bugdroid, Feb 4

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8cbad7f272e5689b6da02745779998e805d12b23

commit 8cbad7f272e5689b6da02745779998e805d12b23
Author: Maksim Moskvitin <mmoskvitin@google.com>
Date: Mon Feb 04 16:23:43 2019

[Sync] Move SyncUserSettingsImpl to components/sync/driver

Bug: 896303,884159,906611
Change-Id: I359b1893cc6f8b32ab2039ee02823dee3850f3f2
Reviewed-on: https://chromium-review.googlesource.com/c/1451889
Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628761}
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/browser_sync/BUILD.gn
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/browser_sync/profile_sync_service_mock.cc
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/browser_sync/profile_sync_service_mock.h
[modify] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/sync/BUILD.gn
[rename] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/sync/driver/sync_user_settings_impl.cc
[rename] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/sync/driver/sync_user_settings_impl.h
[rename] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/sync/driver/sync_user_settings_mock.cc
[rename] https://crrev.com/8cbad7f272e5689b6da02745779998e805d12b23/components/sync/driver/sync_user_settings_mock.h

Sign in to add a comment