| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/sync/sync_prefs.h" | 5 #include "chrome/browser/sync/sync_prefs.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_number_conversions.h" | 8 #include "base/string_number_conversions.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 #endif | 333 #endif |
| 334 | 334 |
| 335 pref_service_->RegisterBooleanPref(prefs::kSyncKeepEverythingSynced, | 335 pref_service_->RegisterBooleanPref(prefs::kSyncKeepEverythingSynced, |
| 336 enable_by_default, | 336 enable_by_default, |
| 337 PrefService::UNSYNCABLE_PREF); | 337 PrefService::UNSYNCABLE_PREF); |
| 338 | 338 |
| 339 // Treat bookmarks specially. | 339 // Treat bookmarks specially. |
| 340 RegisterDataTypePreferredPref(syncer::BOOKMARKS, true); | 340 RegisterDataTypePreferredPref(syncer::BOOKMARKS, true); |
| 341 for (int i = syncer::PREFERENCES; i < syncer::MODEL_TYPE_COUNT; ++i) { | 341 for (int i = syncer::PREFERENCES; i < syncer::MODEL_TYPE_COUNT; ++i) { |
| 342 const syncer::ModelType type = syncer::ModelTypeFromInt(i); | 342 const syncer::ModelType type = syncer::ModelTypeFromInt(i); |
| 343 // Also treat nigori specially. | 343 // Treat these types specially. |
| 344 if (type == syncer::NIGORI) { | 344 if (IsControlType(type)) { |
| 345 continue; | 345 continue; |
| 346 } | 346 } |
| 347 RegisterDataTypePreferredPref(type, enable_by_default); | 347 RegisterDataTypePreferredPref(type, enable_by_default); |
| 348 } | 348 } |
| 349 | 349 |
| 350 pref_service_->RegisterBooleanPref(prefs::kSyncManaged, | 350 pref_service_->RegisterBooleanPref(prefs::kSyncManaged, |
| 351 false, | 351 false, |
| 352 PrefService::UNSYNCABLE_PREF); | 352 PrefService::UNSYNCABLE_PREF); |
| 353 pref_service_->RegisterStringPref(prefs::kSyncEncryptionBootstrapToken, | 353 pref_service_->RegisterStringPref(prefs::kSyncEncryptionBootstrapToken, |
| 354 "", | 354 "", |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 if (types.Has(i->first)) | 433 if (types.Has(i->first)) |
| 434 types_with_groups.PutAll(i->second); | 434 types_with_groups.PutAll(i->second); |
| 435 else | 435 else |
| 436 types_with_groups.RemoveAll(i->second); | 436 types_with_groups.RemoveAll(i->second); |
| 437 } | 437 } |
| 438 types_with_groups.RetainAll(registered_types); | 438 types_with_groups.RetainAll(registered_types); |
| 439 return types_with_groups; | 439 return types_with_groups; |
| 440 } | 440 } |
| 441 | 441 |
| 442 } // namespace browser_sync | 442 } // namespace browser_sync |
| OLD | NEW |