| 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/profile_sync_service.h" | 5 #include "chrome/browser/sync/profile_sync_service.h" |
| 6 | 6 |
| 7 #include <cstddef> | 7 #include <cstddef> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 sync_driver::user_selectable_type::PASSWORDS, | 1747 sync_driver::user_selectable_type::PASSWORDS, |
| 1748 sync_driver::user_selectable_type::AUTOFILL, | 1748 sync_driver::user_selectable_type::AUTOFILL, |
| 1749 sync_driver::user_selectable_type::THEMES, | 1749 sync_driver::user_selectable_type::THEMES, |
| 1750 sync_driver::user_selectable_type::TYPED_URLS, | 1750 sync_driver::user_selectable_type::TYPED_URLS, |
| 1751 sync_driver::user_selectable_type::EXTENSIONS, | 1751 sync_driver::user_selectable_type::EXTENSIONS, |
| 1752 sync_driver::user_selectable_type::APPS, | 1752 sync_driver::user_selectable_type::APPS, |
| 1753 sync_driver::user_selectable_type::WIFI_CREDENTIAL, | 1753 sync_driver::user_selectable_type::WIFI_CREDENTIAL, |
| 1754 sync_driver::user_selectable_type::PROXY_TABS, | 1754 sync_driver::user_selectable_type::PROXY_TABS, |
| 1755 }; | 1755 }; |
| 1756 | 1756 |
| 1757 COMPILE_ASSERT(34 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1757 static_assert(34 == syncer::MODEL_TYPE_COUNT, |
| 1758 "custom config histogram must be updated"); |
| 1758 | 1759 |
| 1759 if (!sync_everything) { | 1760 if (!sync_everything) { |
| 1760 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1761 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1761 | 1762 |
| 1762 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); | 1763 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); |
| 1763 syncer::ModelTypeSet::Iterator it = type_set.First(); | 1764 syncer::ModelTypeSet::Iterator it = type_set.First(); |
| 1764 | 1765 |
| 1765 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); | 1766 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); |
| 1766 | 1767 |
| 1767 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); | 1768 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); |
| (...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2753 | 2754 |
| 2754 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { | 2755 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { |
| 2755 if (sync_thread_) { | 2756 if (sync_thread_) { |
| 2756 return sync_thread_->message_loop(); | 2757 return sync_thread_->message_loop(); |
| 2757 } else if (backend_) { | 2758 } else if (backend_) { |
| 2758 return backend_->GetSyncLoopForTesting(); | 2759 return backend_->GetSyncLoopForTesting(); |
| 2759 } else { | 2760 } else { |
| 2760 return NULL; | 2761 return NULL; |
| 2761 } | 2762 } |
| 2762 } | 2763 } |
| OLD | NEW |