Index: chrome/browser/sync/profile_sync_service.cc |
diff --git a/chrome/browser/sync/profile_sync_service.cc b/chrome/browser/sync/profile_sync_service.cc |
index fca60be161f368638f194e8bbf6f89a54e474690..81cffd90c24ee918d5b52913c2855ea325640b8e 100644 |
--- a/chrome/browser/sync/profile_sync_service.cc |
+++ b/chrome/browser/sync/profile_sync_service.cc |
@@ -59,6 +59,7 @@ |
#include "sync/api/sync_error.h" |
#include "sync/internal_api/public/configure_reason.h" |
#include "sync/internal_api/public/util/experiments.h" |
+#include "sync/internal_api/public/util/sync_string_conversions.h" |
#include "sync/js/js_arg_list.h" |
#include "sync/js/js_event_details.h" |
#include "sync/util/cryptographer.h" |
@@ -352,6 +353,7 @@ void ProfileSyncService::InitializeBackend(bool delete_stale_data) { |
initial_types, |
credentials, |
delete_stale_data, |
+ &sync_manager_factory_, |
backend_unrecoverable_error_handler_.get(), |
&browser_sync::ChromeReportUnrecoverableError); |
} |
@@ -1195,14 +1197,13 @@ void ProfileSyncService::ConfigureDataTypeManager() { |
syncer::ConfigureReason reason = syncer::CONFIGURE_REASON_UNKNOWN; |
if (!HasSyncSetupCompleted()) { |
reason = syncer::CONFIGURE_REASON_NEW_CLIENT; |
- } else if (restart == false || |
- syncer::InitialSyncEndedForTypes(types, GetUserShare())) { |
- reason = syncer::CONFIGURE_REASON_RECONFIGURATION; |
- } else { |
- DCHECK(restart); |
+ } else if (restart) { |
+ // If no datatype was actually enabled, this configuration call shouldn't |
+ // download any types, and will just activate the existing datatypes. |
reason = syncer::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE; |
tim (not reviewing)
2012/07/16 23:07:47
Hmm. restart == true doesn't imply a newly enable
Nicolas Zea
2012/07/17 00:56:17
Discussed offline. I adjusted the comments, and ad
|
+ } else { |
+ reason = syncer::CONFIGURE_REASON_RECONFIGURATION; |
} |
- DCHECK(reason != syncer::CONFIGURE_REASON_UNKNOWN); |
data_type_manager_->Configure(types, reason); |
} |