| 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 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 browser_sync::user_selectable_type::AUTOFILL, | 1258 browser_sync::user_selectable_type::AUTOFILL, |
| 1259 browser_sync::user_selectable_type::BOOKMARKS, | 1259 browser_sync::user_selectable_type::BOOKMARKS, |
| 1260 browser_sync::user_selectable_type::EXTENSIONS, | 1260 browser_sync::user_selectable_type::EXTENSIONS, |
| 1261 browser_sync::user_selectable_type::PASSWORDS, | 1261 browser_sync::user_selectable_type::PASSWORDS, |
| 1262 browser_sync::user_selectable_type::PREFERENCES, | 1262 browser_sync::user_selectable_type::PREFERENCES, |
| 1263 browser_sync::user_selectable_type::SESSIONS, | 1263 browser_sync::user_selectable_type::SESSIONS, |
| 1264 browser_sync::user_selectable_type::THEMES, | 1264 browser_sync::user_selectable_type::THEMES, |
| 1265 browser_sync::user_selectable_type::TYPED_URLS | 1265 browser_sync::user_selectable_type::TYPED_URLS |
| 1266 }; | 1266 }; |
| 1267 | 1267 |
| 1268 COMPILE_ASSERT(17 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1268 COMPILE_ASSERT(18 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
| 1269 COMPILE_ASSERT(arraysize(model_types) == | 1269 COMPILE_ASSERT(arraysize(model_types) == |
| 1270 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1270 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
| 1271 UpdateCustomConfigHistogram); | 1271 UpdateCustomConfigHistogram); |
| 1272 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1272 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
| 1273 UpdateCustomConfigHistogram); | 1273 UpdateCustomConfigHistogram); |
| 1274 | 1274 |
| 1275 if (!sync_everything) { | 1275 if (!sync_everything) { |
| 1276 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1276 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1277 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1277 for (size_t i = 0; i < arraysize(model_types); ++i) { |
| 1278 const syncer::ModelType type = model_types[i]; | 1278 const syncer::ModelType type = model_types[i]; |
| (...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1855 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1856 ProfileSyncService* old_this = this; | 1856 ProfileSyncService* old_this = this; |
| 1857 this->~ProfileSyncService(); | 1857 this->~ProfileSyncService(); |
| 1858 new(old_this) ProfileSyncService( | 1858 new(old_this) ProfileSyncService( |
| 1859 new ProfileSyncComponentsFactoryImpl(profile, | 1859 new ProfileSyncComponentsFactoryImpl(profile, |
| 1860 CommandLine::ForCurrentProcess()), | 1860 CommandLine::ForCurrentProcess()), |
| 1861 profile, | 1861 profile, |
| 1862 signin, | 1862 signin, |
| 1863 behavior); | 1863 behavior); |
| 1864 } | 1864 } |
| OLD | NEW |