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

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

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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 1737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1748 sync_driver::user_selectable_type::PASSWORDS, 1748 sync_driver::user_selectable_type::PASSWORDS,
1749 sync_driver::user_selectable_type::AUTOFILL, 1749 sync_driver::user_selectable_type::AUTOFILL,
1750 sync_driver::user_selectable_type::THEMES, 1750 sync_driver::user_selectable_type::THEMES,
1751 sync_driver::user_selectable_type::TYPED_URLS, 1751 sync_driver::user_selectable_type::TYPED_URLS,
1752 sync_driver::user_selectable_type::EXTENSIONS, 1752 sync_driver::user_selectable_type::EXTENSIONS,
1753 sync_driver::user_selectable_type::APPS, 1753 sync_driver::user_selectable_type::APPS,
1754 sync_driver::user_selectable_type::WIFI_CREDENTIAL, 1754 sync_driver::user_selectable_type::WIFI_CREDENTIAL,
1755 sync_driver::user_selectable_type::PROXY_TABS, 1755 sync_driver::user_selectable_type::PROXY_TABS,
1756 }; 1756 };
1757 1757
1758 COMPILE_ASSERT(34 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); 1758 static_assert(34 == syncer::MODEL_TYPE_COUNT,
1759 "custom config histogram must be updated");
1759 1760
1760 if (!sync_everything) { 1761 if (!sync_everything) {
1761 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); 1762 const syncer::ModelTypeSet current_types = GetPreferredDataTypes();
1762 1763
1763 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); 1764 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes();
1764 syncer::ModelTypeSet::Iterator it = type_set.First(); 1765 syncer::ModelTypeSet::Iterator it = type_set.First();
1765 1766
1766 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); 1767 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size());
1767 1768
1768 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); 1769 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good();
(...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2755 2756
2756 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const { 2757 base::MessageLoop* ProfileSyncService::GetSyncLoopForTest() const {
2757 if (sync_thread_) { 2758 if (sync_thread_) {
2758 return sync_thread_->message_loop(); 2759 return sync_thread_->message_loop();
2759 } else if (backend_) { 2760 } else if (backend_) {
2760 return backend_->GetSyncLoopForTesting(); 2761 return backend_->GetSyncLoopForTesting();
2761 } else { 2762 } else {
2762 return NULL; 2763 return NULL;
2763 } 2764 }
2764 } 2765 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698