Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1104)

Side by Side Diff: chrome/browser/sync/profile_sync_service.cc

Issue 674633002: sync: add WIFI_CREDENTIALS protobuf, ModelType, and preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local-master
Patch Set: resolve conflicts with https://codereview.chromium.org/673983003 Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after
1731 const sync_driver::user_selectable_type::UserSelectableSyncType 1731 const sync_driver::user_selectable_type::UserSelectableSyncType
1732 user_selectable_types[] = { 1732 user_selectable_types[] = {
1733 sync_driver::user_selectable_type::BOOKMARKS, 1733 sync_driver::user_selectable_type::BOOKMARKS,
1734 sync_driver::user_selectable_type::PREFERENCES, 1734 sync_driver::user_selectable_type::PREFERENCES,
1735 sync_driver::user_selectable_type::PASSWORDS, 1735 sync_driver::user_selectable_type::PASSWORDS,
1736 sync_driver::user_selectable_type::AUTOFILL, 1736 sync_driver::user_selectable_type::AUTOFILL,
1737 sync_driver::user_selectable_type::THEMES, 1737 sync_driver::user_selectable_type::THEMES,
1738 sync_driver::user_selectable_type::TYPED_URLS, 1738 sync_driver::user_selectable_type::TYPED_URLS,
1739 sync_driver::user_selectable_type::EXTENSIONS, 1739 sync_driver::user_selectable_type::EXTENSIONS,
1740 sync_driver::user_selectable_type::APPS, 1740 sync_driver::user_selectable_type::APPS,
1741 sync_driver::user_selectable_type::PROXY_TABS 1741 sync_driver::user_selectable_type::WIFI_CREDENTIAL,
1742 sync_driver::user_selectable_type::PROXY_TABS,
1742 }; 1743 };
1743 1744
1744 COMPILE_ASSERT(32 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); 1745 COMPILE_ASSERT(33 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram);
1745 1746
1746 if (!sync_everything) { 1747 if (!sync_everything) {
1747 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); 1748 const syncer::ModelTypeSet current_types = GetPreferredDataTypes();
1748 1749
1749 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); 1750 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes();
1750 syncer::ModelTypeSet::Iterator it = type_set.First(); 1751 syncer::ModelTypeSet::Iterator it = type_set.First();
1751 1752
1752 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); 1753 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size());
1753 1754
1754 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); 1755 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good();
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2729 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const { 2730 base::Time ProfileSyncService::GetDeviceBackupTimeForTesting() const {
2730 return device_info_sync_service_->GetLocalDeviceBackupTime(); 2731 return device_info_sync_service_->GetLocalDeviceBackupTime();
2731 } 2732 }
2732 2733
2733 void ProfileSyncService::FlushDirectory() const { 2734 void ProfileSyncService::FlushDirectory() const {
2734 // backend_initialized_ implies backend_ isn't NULL and the manager exists. 2735 // backend_initialized_ implies backend_ isn't NULL and the manager exists.
2735 // If sync is not initialized yet, we fail silently. 2736 // If sync is not initialized yet, we fail silently.
2736 if (backend_initialized_) 2737 if (backend_initialized_)
2737 backend_->FlushDirectory(); 2738 backend_->FlushDirectory();
2738 } 2739 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698