Chromium Code Reviews| 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 ee4690a69a8e1d87538731466a373a80507be997..9cd504eac85a3b1fcd16820249e9b3f738205b7c 100644 |
| --- a/chrome/browser/sync/profile_sync_service.cc |
| +++ b/chrome/browser/sync/profile_sync_service.cc |
| @@ -1413,6 +1413,7 @@ void ProfileSyncService::ChangePreferredDataTypes( |
| ReconfigureDatatypeManager(); |
| } |
| +// TODO(albertb): Extract a common method. |
| syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const { |
| const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes(); |
| const syncer::ModelTypeSet preferred_types = |
| @@ -1422,6 +1423,16 @@ syncer::ModelTypeSet ProfileSyncService::GetPreferredDataTypes() const { |
| return Difference(preferred_types, failed_types); |
| } |
| +syncer::ModelTypeSet ProfileSyncService::GetPriorityDataTypes() const { |
| + const syncer::ModelTypeSet registered_types = GetRegisteredDataTypes(); |
| + const syncer::ModelTypeSet preferred_types = |
| + sync_prefs_.GetPreferredDataTypes(registered_types); |
| + const syncer::ModelTypeSet failed_types = |
| + failed_datatypes_handler_.GetFailedTypes(); |
| + return Difference(Intersection(preferred_types, syncer::PriorityUserTypes()), |
| + failed_types); |
| +} |
| + |
| syncer::ModelTypeSet ProfileSyncService::GetRegisteredDataTypes() const { |
| syncer::ModelTypeSet registered_types; |
| // The data_type_controllers_ are determined by command-line flags; that's |
| @@ -1494,6 +1505,10 @@ void ProfileSyncService::ConfigureDataTypeManager() { |
| } |
| #endif |
| + const syncer::ModelTypeSet priority_types = GetPriorityDataTypes(); |
| + data_type_manager_->Configure(priority_types, |
|
Nicolas Zea
2013/02/21 23:41:11
hmm, I'm not sure this is the right place to do th
albertb
2013/02/22 20:08:47
Done.
|
| + syncer::CONFIGURE_REASON_RECONFIGURATION); |
| + |
| const syncer::ModelTypeSet types = GetPreferredDataTypes(); |
| if (IsPassphraseRequiredForDecryption()) { |
| // We need a passphrase still. We don't bother to attempt to configure |