Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3401)

Unified Diff: chrome/browser/sync/glue/sync_backend_host.cc

Issue 7281017: [Sync] Add RequestCleanupDisabledTypes() method to SyncManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/glue/sync_backend_host.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host.cc b/chrome/browser/sync/glue/sync_backend_host.cc
index 7334ebdb26d5d7c648f603b048a30b37ec2c5013..6dd5f26d7202256e918146150f9cf5e48280c75a 100644
--- a/chrome/browser/sync/glue/sync_backend_host.cc
+++ b/chrome/browser/sync/glue/sync_backend_host.cc
@@ -341,8 +341,8 @@ void SyncBackendHost::ConfigureAutofillMigration() {
}
SyncBackendHost::PendingConfigureDataTypesState::
-PendingConfigureDataTypesState() : deleted_type(false),
- reason(sync_api::CONFIGURE_REASON_UNKNOWN) {}
+PendingConfigureDataTypesState()
+ : reason(sync_api::CONFIGURE_REASON_UNKNOWN) {}
SyncBackendHost::PendingConfigureDataTypesState::
~PendingConfigureDataTypesState() {}
@@ -362,7 +362,6 @@ SyncBackendHost::PendingConfigureDataTypesState*
syncable::ModelType type = it->first;
// If a type is not specified, remove it from the routing_info.
if (types.count(type) == 0) {
- state->deleted_type = true;
routing_info->erase(type);
} else {
// Add a newly specified data type as GROUP_PASSIVE into the
@@ -377,7 +376,6 @@ SyncBackendHost::PendingConfigureDataTypesState*
// We must handle NIGORI separately as it has no DataTypeController.
if (types.count(syncable::NIGORI) == 0) {
if (nigori_enabled) { // Nigori is currently enabled.
- state->deleted_type = true;
routing_info->erase(syncable::NIGORI);
// IsNigoriEnabled is now false.
}
@@ -450,11 +448,6 @@ void SyncBackendHost::FinishConfigureDataTypesOnFrontendLoop() {
VLOG(1) << "Syncer in config mode. SBH executing"
<< "FinishConfigureDataTypesOnFrontendLoop";
- if (pending_config_mode_state_->deleted_type) {
- sync_thread_.message_loop()->PostTask(FROM_HERE,
- NewRunnableMethod(core_.get(),
- &SyncBackendHost::Core::DeferNudgeForCleanup));
- }
if (pending_config_mode_state_->added_types.none() &&
!core_->sync_manager()->InitialSyncEndedForAllEnabledTypes()) {
@@ -702,9 +695,7 @@ SyncBackendHost::Core::Core(const std::string& name, SyncBackendHost* backend)
host_(backend),
sync_manager_observer_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),
parent_router_(NULL),
- processing_passphrase_(false),
- deferred_nudge_for_cleanup_requested_(false) {
-}
+ processing_passphrase_(false) {}
// Helper to construct a user agent string (ASCII) suitable for use by
// the syncapi for any HTTP communication. This string is used by the sync
@@ -783,9 +774,6 @@ void SyncBackendHost::Core::DoUpdateEnabledTypes() {
void SyncBackendHost::Core::DoStartSyncing() {
DCHECK(MessageLoop::current() == host_->sync_thread_.message_loop());
sync_manager_->StartSyncingNormally();
- if (deferred_nudge_for_cleanup_requested_)
- sync_manager_->RequestNudge(FROM_HERE);
- deferred_nudge_for_cleanup_requested_ = false;
}
void SyncBackendHost::Core::DoSetPassphrase(const std::string& passphrase,
@@ -1225,9 +1213,4 @@ void SyncBackendHost::Core::DoProcessMessage(
sync_manager_->GetJsBackend()->ProcessMessage(name, args, sender);
}
-void SyncBackendHost::Core::DeferNudgeForCleanup() {
- DCHECK_EQ(MessageLoop::current(), host_->sync_thread_.message_loop());
- deferred_nudge_for_cleanup_requested_ = true;
-}
-
} // namespace browser_sync

Powered by Google App Engine
This is Rietveld 408576698