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_member.h" | 9 #include "base/prefs/pref_member.h" |
10 #include "base/prefs/pref_service.h" | 10 #include "base/prefs/pref_service.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
408 | 408 |
409 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); | 409 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); |
410 | 410 |
411 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); | 411 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); |
412 | 412 |
413 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); | 413 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); |
414 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); | 414 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); |
415 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); | 415 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); |
416 | 416 |
417 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); | 417 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); |
418 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 418 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); |
Nicolas Zea
2013/04/18 17:43:35
I think we should have this guarded by !kDisableFu
Patrick Dubroy
2013/04/19 09:58:09
Done.
| |
419 if (command_line.HasSwitch(switches::kHistoryEnableFullHistorySync)) { | 419 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); |
420 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); | 420 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); |
421 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); | |
422 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); | |
423 } | |
424 | 421 |
425 pref_groups_[syncer::PROXY_TABS].Put(syncer::SESSIONS); | 422 pref_groups_[syncer::PROXY_TABS].Put(syncer::SESSIONS); |
426 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_IMAGES); | 423 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_IMAGES); |
427 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_TRACKING); | 424 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_TRACKING); |
428 | 425 |
429 // TODO(zea): put favicons in the bookmarks group as well once it handles | 426 // TODO(zea): put favicons in the bookmarks group as well once it handles |
430 // those favicons. | 427 // those favicons. |
431 } | 428 } |
432 | 429 |
433 // static | 430 // static |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
484 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); | 481 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); |
485 i != pref_groups_.end(); ++i) { | 482 i != pref_groups_.end(); ++i) { |
486 if (types.Has(i->first)) | 483 if (types.Has(i->first)) |
487 types_with_groups.PutAll(i->second); | 484 types_with_groups.PutAll(i->second); |
488 } | 485 } |
489 types_with_groups.RetainAll(registered_types); | 486 types_with_groups.RetainAll(registered_types); |
490 return types_with_groups; | 487 return types_with_groups; |
491 } | 488 } |
492 | 489 |
493 } // namespace browser_sync | 490 } // namespace browser_sync |
OLD | NEW |