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 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 const sync_driver::user_selectable_type::UserSelectableSyncType | 1730 const sync_driver::user_selectable_type::UserSelectableSyncType |
1731 user_selectable_types[] = { | 1731 user_selectable_types[] = { |
1732 sync_driver::user_selectable_type::BOOKMARKS, | 1732 sync_driver::user_selectable_type::BOOKMARKS, |
1733 sync_driver::user_selectable_type::PREFERENCES, | 1733 sync_driver::user_selectable_type::PREFERENCES, |
1734 sync_driver::user_selectable_type::PASSWORDS, | 1734 sync_driver::user_selectable_type::PASSWORDS, |
1735 sync_driver::user_selectable_type::AUTOFILL, | 1735 sync_driver::user_selectable_type::AUTOFILL, |
1736 sync_driver::user_selectable_type::THEMES, | 1736 sync_driver::user_selectable_type::THEMES, |
1737 sync_driver::user_selectable_type::TYPED_URLS, | 1737 sync_driver::user_selectable_type::TYPED_URLS, |
1738 sync_driver::user_selectable_type::EXTENSIONS, | 1738 sync_driver::user_selectable_type::EXTENSIONS, |
1739 sync_driver::user_selectable_type::APPS, | 1739 sync_driver::user_selectable_type::APPS, |
1740 sync_driver::user_selectable_type::PROXY_TABS | 1740 sync_driver::user_selectable_type::WIFI_CREDENTIAL, |
| 1741 sync_driver::user_selectable_type::PROXY_TABS, |
1741 }; | 1742 }; |
1742 | 1743 |
1743 COMPILE_ASSERT(33 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1744 COMPILE_ASSERT(34 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
1744 | 1745 |
1745 if (!sync_everything) { | 1746 if (!sync_everything) { |
1746 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1747 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
1747 | 1748 |
1748 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); | 1749 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); |
1749 syncer::ModelTypeSet::Iterator it = type_set.First(); | 1750 syncer::ModelTypeSet::Iterator it = type_set.First(); |
1750 | 1751 |
1751 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); | 1752 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); |
1752 | 1753 |
1753 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); | 1754 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); |
(...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2716 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { | 2717 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { |
2717 return device_info_sync_service_->GetLocalDeviceBackupTime(); | 2718 return device_info_sync_service_->GetLocalDeviceBackupTime(); |
2718 } | 2719 } |
2719 | 2720 |
2720 void ProfileSyncService::FlushDirectory() const { | 2721 void ProfileSyncService::FlushDirectory() const { |
2721 // backend_initialized_ implies backend_ isn't NULL and the manager exists. | 2722 // backend_initialized_ implies backend_ isn't NULL and the manager exists. |
2722 // If sync is not initialized yet, we fail silently. | 2723 // If sync is not initialized yet, we fail silently. |
2723 if (backend_initialized_) | 2724 if (backend_initialized_) |
2724 backend_->FlushDirectory(); | 2725 backend_->FlushDirectory(); |
2725 } | 2726 } |
OLD | NEW |