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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 | 404 |
405 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); | 405 pref_groups_[syncer::AUTOFILL].Put(syncer::AUTOFILL_PROFILE); |
406 | 406 |
407 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); | 407 pref_groups_[syncer::EXTENSIONS].Put(syncer::EXTENSION_SETTINGS); |
408 | 408 |
409 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); | 409 pref_groups_[syncer::PREFERENCES].Put(syncer::DICTIONARY); |
410 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); | 410 pref_groups_[syncer::PREFERENCES].Put(syncer::PRIORITY_PREFERENCES); |
411 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); | 411 pref_groups_[syncer::PREFERENCES].Put(syncer::SEARCH_ENGINES); |
412 | 412 |
413 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); | 413 pref_groups_[syncer::TYPED_URLS].Put(syncer::HISTORY_DELETE_DIRECTIVES); |
414 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 414 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
415 if (command_line.HasSwitch(switches::kHistoryEnableFullHistorySync)) { | 415 switches::kHistoryDisableFullHistorySync)) { |
416 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); | 416 pref_groups_[syncer::TYPED_URLS].Put(syncer::SESSIONS); |
417 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); | 417 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_IMAGES); |
418 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); | 418 pref_groups_[syncer::TYPED_URLS].Put(syncer::FAVICON_TRACKING); |
419 } | 419 } |
420 | 420 |
421 pref_groups_[syncer::PROXY_TABS].Put(syncer::SESSIONS); | 421 pref_groups_[syncer::PROXY_TABS].Put(syncer::SESSIONS); |
422 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_IMAGES); | 422 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_IMAGES); |
423 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_TRACKING); | 423 pref_groups_[syncer::PROXY_TABS].Put(syncer::FAVICON_TRACKING); |
424 | 424 |
425 // TODO(zea): put favicons in the bookmarks group as well once it handles | 425 // TODO(zea): put favicons in the bookmarks group as well once it handles |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); | 480 for (PrefGroupsMap::const_iterator i = pref_groups_.begin(); |
481 i != pref_groups_.end(); ++i) { | 481 i != pref_groups_.end(); ++i) { |
482 if (types.Has(i->first)) | 482 if (types.Has(i->first)) |
483 types_with_groups.PutAll(i->second); | 483 types_with_groups.PutAll(i->second); |
484 } | 484 } |
485 types_with_groups.RetainAll(registered_types); | 485 types_with_groups.RetainAll(registered_types); |
486 return types_with_groups; | 486 return types_with_groups; |
487 } | 487 } |
488 | 488 |
489 } // namespace browser_sync | 489 } // namespace browser_sync |
OLD | NEW |