| 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/prefs/public/pref_member.h" | 9 #include "base/prefs/public/pref_member.h" |
| 10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 case syncer::HISTORY_DELETE_DIRECTIVES: | 313 case syncer::HISTORY_DELETE_DIRECTIVES: |
| 314 return prefs::kSyncHistoryDeleteDirectives; | 314 return prefs::kSyncHistoryDeleteDirectives; |
| 315 case syncer::SYNCED_NOTIFICATIONS: | 315 case syncer::SYNCED_NOTIFICATIONS: |
| 316 return prefs::kSyncSyncedNotifications; | 316 return prefs::kSyncSyncedNotifications; |
| 317 case syncer::DICTIONARY: | 317 case syncer::DICTIONARY: |
| 318 return prefs::kSyncDictionary; | 318 return prefs::kSyncDictionary; |
| 319 case syncer::FAVICON_IMAGES: | 319 case syncer::FAVICON_IMAGES: |
| 320 return prefs::kSyncFaviconImages; | 320 return prefs::kSyncFaviconImages; |
| 321 case syncer::FAVICON_TRACKING: | 321 case syncer::FAVICON_TRACKING: |
| 322 return prefs::kSyncFaviconTracking; | 322 return prefs::kSyncFaviconTracking; |
| 323 case syncer::PRIORITY_PREFERENCES: |
| 324 return prefs::kSyncPriorityPreferences; |
| 323 default: | 325 default: |
| 324 break; | 326 break; |
| 325 } | 327 } |
| 326 NOTREACHED(); | 328 NOTREACHED(); |
| 327 return NULL; | 329 return NULL; |
| 328 } | 330 } |
| 329 | 331 |
| 330 #if defined(OS_CHROMEOS) | 332 #if defined(OS_CHROMEOS) |
| 331 std::string SyncPrefs::GetSpareBootstrapToken() const { | 333 std::string SyncPrefs::GetSpareBootstrapToken() const { |
| 332 DCHECK(CalledOnValidThread()); | 334 DCHECK(CalledOnValidThread()); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 380 |
| 379 void SyncPrefs::RegisterPrefGroups() { | 381 void SyncPrefs::RegisterPrefGroups() { |
| 380 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); | 382 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); |
| 381 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); | 383 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); |
| 382 | 384 |
| 383 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); | 385 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); |
| 384 | 386 |
| 385 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); | 387 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); |
| 386 | 388 |
| 387 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); | 389 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); |
| 390 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); |
| 388 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); | 391 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); |
| 389 | 392 |
| 390 // TODO(zea): put favicons in the bookmarks group as well once it handles | 393 // TODO(zea): put favicons in the bookmarks group as well once it handles |
| 391 // those favicons. | 394 // those favicons. |
| 392 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_IMAGES); | 395 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_IMAGES); |
| 393 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_TRACKING); | 396 pref_groups_[syncer::SESSIONS].Put(syncer::FAVICON_TRACKING); |
| 394 | 397 |
| 395 // TODO(akalin): Revisit this once UI lands. | 398 // TODO(akalin): Revisit this once UI lands. |
| 396 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES); | 399 pref_groups_[syncer::SESSIONS].Put(syncer::HISTORY_DELETE_DIRECTIVES); |
| 397 } | 400 } |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 if (types.Has(i->first)) | 448 if (types.Has(i->first)) |
| 446 types_with_groups.PutAll(i->second); | 449 types_with_groups.PutAll(i->second); |
| 447 else | 450 else |
| 448 types_with_groups.RemoveAll(i->second); | 451 types_with_groups.RemoveAll(i->second); |
| 449 } | 452 } |
| 450 types_with_groups.RetainAll(registered_types); | 453 types_with_groups.RetainAll(registered_types); |
| 451 return types_with_groups; | 454 return types_with_groups; |
| 452 } | 455 } |
| 453 | 456 |
| 454 } // namespace browser_sync | 457 } // namespace browser_sync |
| OLD | NEW |