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

Issue 895824 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 836718



Sign in to add a comment

[Autofill profile] Disable USS sync based on a autofill::prefs::kAutofillProfileEnabled

Project Member Reported by jkrcal@chromium.org, Oct 16

Issue description

We need to disable syncing if any of the toggles are off:
 1 - autofill::prefs::kAutofillProfileEnabled
 2 - maybe autofill::prefs::kAutofillWalletImportEnabled?

The implementation should be similar to how this is implemented for wallet data bridge in autofill_wallet_model_type_controller.cc. The only difference is that we should not delete the actual data when sync gets disabled (as the data can continue living locally).
 
Seb, is it correct? Should we disable address sync if 2) is disabled?

I see two toggles in the settings:
 - one for the sync type "Autofill"
 - the other is in "Addresses & payment methods" > "Autofill forms"

Seb, how do these translate to prefs, what are the prefs we should react on?
prefs::kAutofillWalletImportEnabled is definitely NOT the right one; that's for Wallet only, so shouldn't influence addresses.
Looking at AutofillProfileDataTypeController, I think autofill::prefs::kAutofillProfileEnabled is the only relevant pref here.
Labels: -Pri-3 M-72 Pri-2
For addresses, turning off kAutofillProfileEnabled should turn of sync of addresses but not clear the data. Same behavior for turning off the Autofill toggle in the sync settings page.

Like treib@ mentioned, the kAutofillWalletImportEnabled should have no effect on addresses.

Let me know if this is not clear
Labels: OS-Android OS-Chrome OS-Linux OS-Mac OS-Windows
Summary: [Autofill profile] Disable USS sync based on a autofill::prefs::kAutofillProfileEnabled (was: [Autofill profile] Disable USS sync based on a combination of two preferences)
Cc: -treib@chromium.org
Owner: treib@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/488523c56cae12f54856188d163727c23a4fd7cf

commit 488523c56cae12f54856188d163727c23a4fd7cf
Author: Marc Treib <treib@chromium.org>
Date: Mon Nov 05 12:06:48 2018

Sync: Introduce AutofillProfileModelTypeController

This is the USS version of AutofillProfileDataTypeController. It is very
similar to AutofillWalletModelTypeController, and only implements one
bit of custom logic: Notifying the SyncService when
autofill::prefs::kAutofillProfileEnabled changes, so that syncing of
addresses will get turned on or off as appropriate.

Bug:  895824 
Change-Id: I932794f8a2d1c3556bdc1b7125743a2154eaf997
Reviewed-on: https://chromium-review.googlesource.com/c/1310393
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605298}
[modify] https://crrev.com/488523c56cae12f54856188d163727c23a4fd7cf/components/autofill/core/browser/BUILD.gn
[add] https://crrev.com/488523c56cae12f54856188d163727c23a4fd7cf/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.cc
[add] https://crrev.com/488523c56cae12f54856188d163727c23a4fd7cf/components/autofill/core/browser/webdata/autofill_profile_model_type_controller.h
[modify] https://crrev.com/488523c56cae12f54856188d163727c23a4fd7cf/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/488523c56cae12f54856188d163727c23a4fd7cf/components/browser_sync/profile_sync_components_factory_impl.h

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 7

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

commit 1c9309376a15c980e1e0941cc2b545100ca2781e
Author: Marc Treib <treib@chromium.org>
Date: Wed Nov 07 08:08:52 2018

Fix: Properly disable Autofill Sync when Autofill itself is disabled

This is a fix to the SyncService::ReadyForStartChanged code path:
When stopping the data type, set an UNREADY_ERROR (instead of leaving
the error unset). This causes the Sync engine to reconfigure, which
properly marks the data type as no longer active. Before, the data
type did stop syncing, but was still returned as part of
SyncService::GetActiveDataTypes.

It also adds integration tests that AUTOFILL_PROFILE gets disabled on
autofill::prefs::SetProfileAutofillEnabled(.., false).

Bug:  895824 ,  890737 
Change-Id: I3736ef010ad09ecd79a101aeff400d597956569e
Reviewed-on: https://chromium-review.googlesource.com/c/1319609
Commit-Queue: Marc Treib <treib@chromium.org>
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605990}
[add] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/chrome/browser/sync/test/integration/single_client_autofill_profile_sync_test.cc
[modify] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/chrome/test/BUILD.gn
[modify] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/components/sync/driver/model_association_manager.cc
[modify] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/components/sync/driver/model_association_manager.h
[modify] https://crrev.com/1c9309376a15c980e1e0941cc2b545100ca2781e/components/sync/driver/model_association_manager_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment