summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/sync_manager_impl.h
diff options
context:
space:
mode:
authorzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-07 02:30:24 +0000
committerzea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-07 02:30:24 +0000
commit1f51ad94964af7f256ac1d762a04cfac1e9935c5 (patch)
tree621e43948dbd9825f0d1ab1f501ab0a91bbe9ede /sync/internal_api/sync_manager_impl.h
parent3c372a1ae0e609691994bc74ade55175a3e2ea97 (diff)
downloadchromium_src-1f51ad94964af7f256ac1d762a04cfac1e9935c5.zip
chromium_src-1f51ad94964af7f256ac1d762a04cfac1e9935c5.tar.gz
chromium_src-1f51ad94964af7f256ac1d762a04cfac1e9935c5.tar.bz2
[Sync] Allow enabling partial sets of types instead of blocking
Blocking the datatype manager when datatypes fail to start is a sign of encryption issues, but is not fatal to sync. Therefore, it makes more sense to sync what we can (particularly so we can receive birthday updates), while marking those types with encryption problems as failed. To accomplish this we move all automatic reconfiguration logic into the data type manager itself, and add support for delayed association by unapplying all types with cryptographer errors. This also lays the groundwork for delayed association when a transaction version discrepancy is detected. BUG=238712 Review URL: https://chromiumcodereview.appspot.com/15013004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204695 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/internal_api/sync_manager_impl.h')
-rw-r--r--sync/internal_api/sync_manager_impl.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h
index acc0175..a21b6e8 100644
--- a/sync/internal_api/sync_manager_impl.h
+++ b/sync/internal_api/sync_manager_impl.h
@@ -104,8 +104,10 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
const ModelSafeRoutingInfo& routing_info) OVERRIDE;
virtual void ConfigureSyncer(
ConfigureReason reason,
- ModelTypeSet types_to_config,
- ModelTypeSet failed_types,
+ ModelTypeSet to_download,
+ ModelTypeSet to_journal,
+ ModelTypeSet to_unapply,
+ ModelTypeSet to_ignore,
const ModelSafeRoutingInfo& new_routing_info,
const base::Closure& ready_task,
const base::Closure& retry_task) OVERRIDE;
@@ -199,6 +201,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnNotificationStateChange);
FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, OnIncomingNotification);
FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, PurgeDisabledTypes);
+ FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, PurgeUnappliedTypes);
struct NotificationInfo {
NotificationInfo();
@@ -238,10 +241,14 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
bool OpenDirectory(const std::string& username);
// Purge those types from |previously_enabled_types| that are no longer
- // enabled in |currently_enabled_types|.
+ // enabled in |currently_enabled_types|. |to_journal| and |to_unapply|
+ // specify types that require special handling. |to_journal| types are saved
+ // into the delete journal, while |to_unapply| have only their local data
+ // deleted, while their server data is preserved.
bool PurgeDisabledTypes(ModelTypeSet previously_enabled_types,
ModelTypeSet currently_enabled_types,
- ModelTypeSet failed_types);
+ ModelTypeSet to_journal,
+ ModelTypeSet to_unapply);
void RequestNudgeForDataTypes(
const tracked_objects::Location& nudge_location,