Chromium Code Reviews| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/public/pref_member.h" | 10 #include "base/prefs/public/pref_member.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 case syncer::SYNCED_NOTIFICATIONS: | 337 case syncer::SYNCED_NOTIFICATIONS: |
| 338 return prefs::kSyncSyncedNotifications; | 338 return prefs::kSyncSyncedNotifications; |
| 339 case syncer::DICTIONARY: | 339 case syncer::DICTIONARY: |
| 340 return prefs::kSyncDictionary; | 340 return prefs::kSyncDictionary; |
| 341 case syncer::FAVICON_IMAGES: | 341 case syncer::FAVICON_IMAGES: |
| 342 return prefs::kSyncFaviconImages; | 342 return prefs::kSyncFaviconImages; |
| 343 case syncer::FAVICON_TRACKING: | 343 case syncer::FAVICON_TRACKING: |
| 344 return prefs::kSyncFaviconTracking; | 344 return prefs::kSyncFaviconTracking; |
| 345 case syncer::PROXY_TABS: | 345 case syncer::PROXY_TABS: |
| 346 return prefs::kSyncTabs; | 346 return prefs::kSyncTabs; |
| 347 case syncer::PRIORITY_PREFERENCES: | |
| 348 return prefs::kSyncPriorityPreferences; | |
|
Mattias Nissler (ping if slow)
2013/03/21 06:50:15
Is there any migration needed here? I.e. for exist
albertb
2013/03/21 17:10:33
I'm not sure about this. Nicolas/Tim: what do you
tim (not reviewing)
2013/03/21 18:10:55
We're not adding a checkbox in the UI for this, ri
albertb
2013/03/21 18:46:29
Yes, priority preferences are automatically enable
| |
| 347 default: | 349 default: |
| 348 break; | 350 break; |
| 349 } | 351 } |
| 350 NOTREACHED(); | 352 NOTREACHED(); |
| 351 return NULL; | 353 return NULL; |
| 352 } | 354 } |
| 353 | 355 |
| 354 #if defined(OS_CHROMEOS) | 356 #if defined(OS_CHROMEOS) |
| 355 std::string SyncPrefs::GetSpareBootstrapToken() const { | 357 std::string SyncPrefs::GetSpareBootstrapToken() const { |
| 356 DCHECK(CalledOnValidThread()); | 358 DCHECK(CalledOnValidThread()); |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 402 | 404 |
| 403 void SyncPrefs::RegisterPrefGroups() { | 405 void SyncPrefs::RegisterPrefGroups() { |
| 404 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); | 406 pref_groups_[syncer::APPS].Put(syncer::APP_NOTIFICATIONS); |
| 405 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); | 407 pref_groups_[syncer::APPS].Put(syncer::APP_SETTINGS); |
| 406 | 408 |
| 407 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); | 409 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); |
| 408 | 410 |
| 409 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); | 411 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); |
| 410 | 412 |
| 411 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); | 413 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); |
| 414 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); | |
| 412 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); | 415 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); |
| 413 | 416 |
| 414 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); | 417 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); |
| 415 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 418 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
| 416 if (command_line.HasSwitch(switches::kHistoryEnableFullHistorySync)) { | 419 if (command_line.HasSwitch(switches::kHistoryEnableFullHistorySync)) { |
| 417 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); | 420 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); |
| 418 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); | 421 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); |
| 419 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); | 422 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); |
| 420 } | 423 } |
| 421 | 424 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 481 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); | 484 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); |
| 482 i != pref_groups_.end(); ++i) { | 485 i != pref_groups_.end(); ++i) { |
| 483 if (types.Has(i->first)) | 486 if (types.Has(i->first)) |
| 484 types_with_groups.PutAll(i->second); | 487 types_with_groups.PutAll(i->second); |
| 485 } | 488 } |
| 486 types_with_groups.RetainAll(registered_types); | 489 types_with_groups.RetainAll(registered_types); |
| 487 return types_with_groups; | 490 return types_with_groups; |
| 488 } | 491 } |
| 489 | 492 |
| 490 } // namespace browser_sync | 493 } // namespace browser_sync |
| OLD | NEW |