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

Issue 866814 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature

Blocked on:
issue 855010

Blocking:
issue 840703



Sign in to add a comment

Add support for ephemeral mode to USS types

Project Member Reported by mastiz@chromium.org, Jul 24

Issue description

In future scenarios (see blocked bug), we need USS datatypes to support switching to an ephemeral mode, that is, enter a syncing mode that will leave to persisted trace in the local device (i.e. sync data and metadata should live in memory).

There are at least two solutions to this:
1. Make ModelTypeSyncBridge subclasses aware of this.
2. Have two separate bridge instances, and toggle between the two in ModelTypeController.

Considering our short-term requirements, I'll go with (2) above.
 
Cc: se...@chromium.org
So far, my understanding was that we'd add a flag to the DataTypeActivationRequest that's passed to ModelTypeSyncBridge::OnSyncStarting. When switching between full and ephemeral mode, the data type would get shut down and restarted to make the switch.
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 31

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

commit 44c147a996a01562177ff939867aa7199ec72e09
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Jul 31 07:29:37 2018

Centralize all Configure() calls to DataTypeManager

Most callers anyway need to retrieve information from ProfileSyncService
about the selected datatypes, so let's instead make sure all paths to
DataTypeManager::Configure() are centralized in ProfileSyncService.

This will simplify extending the functions signature in follow-up
patches.

Bug:  866814 , 851476 
Change-Id: Ied3975b9ed833d34aee1802aae36c1332b3b68e0
Reviewed-on: https://chromium-review.googlesource.com/1152812
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579332}
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/browser_sync/profile_sync_service.h
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/backend_migrator.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/backend_migrator.h
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/backend_migrator_unittest.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/data_type_manager.h
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/data_type_manager_impl.h
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/data_type_manager_impl_unittest.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/data_type_manager_mock.h
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/sync_service_crypto.cc
[modify] https://crrev.com/44c147a996a01562177ff939867aa7199ec72e09/components/sync/driver/sync_service_crypto.h

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 1

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

commit 1f26c180b25af04d85e86a7ba4bfafee3aea59a6
Author: Mikel Astiz <mastiz@chromium.org>
Date: Wed Aug 01 05:04:29 2018

Introduce ConfigureContext struct

This struct allows easy plumbing of fields that are representative of
why a datatype is running. This avoids the need to inject SyncClient
in multiple places, which is undesirable because it carries over a long
list of dependencies, including a subtle dependency cycle in some cases
(DeviceInfo) that needs a workaround (the controller's delegate must be
obtained lazily).

We plan to extend this struct with new state information in follow-up
patches.

Bug:  866814 ,867801
Change-Id: I35142c3a04f2f5abba22a5ec23d475c8da8bd292
Reviewed-on: https://chromium-review.googlesource.com/1154532
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#579705}
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/autofill/core/browser/autofill_wallet_data_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/browser_sync/profile_sync_service_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/history/core/browser/typed_url_model_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/history/core/browser/typed_url_model_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/search_engines/search_engine_data_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/BUILD.gn
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/async_directory_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/async_directory_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/async_directory_type_controller_mock.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/async_directory_type_controller_mock.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/async_directory_type_controller_unittest.cc
[add] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/configure_context.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager_impl.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager_impl.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager_impl_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager_mock.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/data_type_manager_mock.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/fake_data_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/fake_data_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/frontend_data_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/frontend_data_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/frontend_data_type_controller_mock.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/frontend_data_type_controller_mock.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/frontend_data_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_association_manager.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_association_manager.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_association_manager_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/model_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/proxy_data_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync/driver/proxy_data_type_controller.h
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync_bookmarks/bookmark_data_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync_sessions/session_data_type_controller_unittest.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync_sessions/session_model_type_controller.cc
[modify] https://crrev.com/1f26c180b25af04d85e86a7ba4bfafee3aea59a6/components/sync_sessions/session_model_type_controller.h

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 2

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

commit 107e86416f5d9f236769fce353878ac247780984
Author: Mikel Astiz <mastiz@chromium.org>
Date: Thu Aug 02 12:19:36 2018

Avoid calls to GetStatusCounters() while datatype NOT_RUNNING

This method, used for debugging (chrome://sync-internals), has no clear
semantics if a datatype hasn't been started. This is specially true with
future work in mind where we plan to introduce different operating modes
(regular vs ephemeral) that are bound to a start-stop configuration
cycle.

We also migrate away from callers having to use BindToCurrentSequence(),
since there seems to be no reason for it (and is really weird after
having recently introduced ModelTypeControllerDelegate).

Bug:  866814 
Change-Id: I653e1ee117883feb42e032faac85d5ba14d28748
Reviewed-on: https://chromium-review.googlesource.com/1160229
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580141}
[modify] https://crrev.com/107e86416f5d9f236769fce353878ac247780984/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/107e86416f5d9f236769fce353878ac247780984/components/sync/driver/data_type_controller.h

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 2

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

commit aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe
Author: Mikel Astiz <mastiz@chromium.org>
Date: Thu Aug 02 15:58:23 2018

Introduce StorageOption during datatype configuration

This allows controllers to start datatypes in ephemeral mode,
which is only supported by ModelTypeController.

Bug:  866814 
Change-Id: I20630c2ed52872baf0ecd23cccbd08f505e8835b
Reviewed-on: https://chromium-review.googlesource.com/1151299
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580205}
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/async_directory_type_controller.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/configure_context.h
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/frontend_data_type_controller.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/model_type_controller.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/model_type_controller.h
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/model_type_controller_unittest.cc
[modify] https://crrev.com/aa2ac6cdafb8db4af5c4f956c2f1dac62a8488fe/components/sync/driver/proxy_data_type_controller.cc

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 7

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

commit 2849f1206375345053d977ea6f8d8648bfcacf90
Author: Mikel Astiz <mastiz@chromium.org>
Date: Tue Aug 07 05:07:24 2018

Sync test changes in preparation for transport-only sync

These should allow tests in upcoming patches to mimic the experimentally
supported scenario where sync the feature is disabled, but the sync
machinery (the engine acting as a transport mechanism) is active as soon
as the user is signed in, in a special mode (subset of datatypes, with
ephemeral storage).

As first user, we introduce a test for USER_CONSENTS.

Bug: 856179, 866814 , 814307 
Change-Id: Ie3b6c2da470dde691862a379977b4e01c4f2ead2
Reviewed-on: https://chromium-review.googlesource.com/1160852
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581137}
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/metrics/ukm_browsertest.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/profile_sync_service_harness.h
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/quiesce_status_change_checker.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/single_client_user_consents_sync_test.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/sync_errors_test.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/sync_test.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/chrome/browser/sync/test/integration/updated_progress_marker_checker.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/components/sync/driver/async_directory_type_controller.cc
[modify] https://crrev.com/2849f1206375345053d977ea6f8d8648bfcacf90/services/identity/public/cpp/identity_manager.h

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 8

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

commit 3e6bf68919d3ce40b32456a793b56d4d2112b6e0
Author: Mikel Astiz <mastiz@chromium.org>
Date: Wed Aug 08 08:49:38 2018

Plumb experimental STORAGE_IN_MEMORY for AUTOFILL_WALLET_DATA

This allows the datatype to switch during runtime from regular mode
(persists data to disk if full sync is enabled) to ephemeral/in-memory
mode (experimetal feature for certain whitelisted datatypes).

It is achieved by injecting a second delegate to ModelTypeController,
specialized in the in-memory mode, and backed up by a dedicated
AutofillWebDataService instance.

Bug:  866814 
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I4017a1603362b2c4381713f07b4bcb0340584836
Reviewed-on: https://chromium-review.googlesource.com/1160854
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Cait Phillips <caitkp@chromium.org>
Commit-Queue: Mikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#581503}
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/chrome/browser/sync/chrome_sync_client.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/chrome/browser/sync/test/integration/single_client_wallet_sync_test.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/components/browser_sync/profile_sync_components_factory_impl.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/components/browser_sync/profile_sync_components_factory_impl.h
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/components/browser_sync/profile_sync_service.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/components/webdata_services/web_data_service_wrapper.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/ios/chrome/browser/sync/ios_chrome_sync_client.h
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/ios/chrome/browser/sync/ios_chrome_sync_client.mm
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/ios/chrome/browser/web_data_service_factory.cc
[modify] https://crrev.com/3e6bf68919d3ce40b32456a793b56d4d2112b6e0/ios/chrome/browser/web_data_service_factory.h

Status: Fixed (was: Started)

Sign in to add a comment