| 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 <set> | 9 #include <set> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 1220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 browser_sync::user_selectable_type::AUTOFILL, | 1231 browser_sync::user_selectable_type::AUTOFILL, |
| 1232 browser_sync::user_selectable_type::BOOKMARKS, | 1232 browser_sync::user_selectable_type::BOOKMARKS, |
| 1233 browser_sync::user_selectable_type::EXTENSIONS, | 1233 browser_sync::user_selectable_type::EXTENSIONS, |
| 1234 browser_sync::user_selectable_type::PASSWORDS, | 1234 browser_sync::user_selectable_type::PASSWORDS, |
| 1235 browser_sync::user_selectable_type::PREFERENCES, | 1235 browser_sync::user_selectable_type::PREFERENCES, |
| 1236 browser_sync::user_selectable_type::SESSIONS, | 1236 browser_sync::user_selectable_type::SESSIONS, |
| 1237 browser_sync::user_selectable_type::THEMES, | 1237 browser_sync::user_selectable_type::THEMES, |
| 1238 browser_sync::user_selectable_type::TYPED_URLS | 1238 browser_sync::user_selectable_type::TYPED_URLS |
| 1239 }; | 1239 }; |
| 1240 | 1240 |
| 1241 COMPILE_ASSERT(17 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1241 COMPILE_ASSERT(18 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
| 1242 COMPILE_ASSERT(arraysize(model_types) == | 1242 COMPILE_ASSERT(arraysize(model_types) == |
| 1243 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1243 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
| 1244 UpdateCustomConfigHistogram); | 1244 UpdateCustomConfigHistogram); |
| 1245 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1245 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
| 1246 UpdateCustomConfigHistogram); | 1246 UpdateCustomConfigHistogram); |
| 1247 | 1247 |
| 1248 if (!sync_everything) { | 1248 if (!sync_everything) { |
| 1249 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1249 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1250 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1250 for (size_t i = 0; i < arraysize(model_types); ++i) { |
| 1251 const syncer::ModelType type = model_types[i]; | 1251 const syncer::ModelType type = model_types[i]; |
| (...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1821 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1821 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1822 ProfileSyncService* old_this = this; | 1822 ProfileSyncService* old_this = this; |
| 1823 this->~ProfileSyncService(); | 1823 this->~ProfileSyncService(); |
| 1824 new(old_this) ProfileSyncService( | 1824 new(old_this) ProfileSyncService( |
| 1825 new ProfileSyncComponentsFactoryImpl(profile, | 1825 new ProfileSyncComponentsFactoryImpl(profile, |
| 1826 CommandLine::ForCurrentProcess()), | 1826 CommandLine::ForCurrentProcess()), |
| 1827 profile, | 1827 profile, |
| 1828 signin, | 1828 signin, |
| 1829 behavior); | 1829 behavior); |
| 1830 } | 1830 } |
| OLD | NEW |