| 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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 browser_sync::user_selectable_type::BOOKMARKS, | 1314 browser_sync::user_selectable_type::BOOKMARKS, |
| 1315 browser_sync::user_selectable_type::EXTENSIONS, | 1315 browser_sync::user_selectable_type::EXTENSIONS, |
| 1316 browser_sync::user_selectable_type::PASSWORDS, | 1316 browser_sync::user_selectable_type::PASSWORDS, |
| 1317 browser_sync::user_selectable_type::PREFERENCES, | 1317 browser_sync::user_selectable_type::PREFERENCES, |
| 1318 browser_sync::user_selectable_type::SESSIONS, | 1318 browser_sync::user_selectable_type::SESSIONS, |
| 1319 browser_sync::user_selectable_type::SYNCED_NOTIFICATIONS, | 1319 browser_sync::user_selectable_type::SYNCED_NOTIFICATIONS, |
| 1320 browser_sync::user_selectable_type::THEMES, | 1320 browser_sync::user_selectable_type::THEMES, |
| 1321 browser_sync::user_selectable_type::TYPED_URLS | 1321 browser_sync::user_selectable_type::TYPED_URLS |
| 1322 }; | 1322 }; |
| 1323 | 1323 |
| 1324 COMPILE_ASSERT(22 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1324 COMPILE_ASSERT(23 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
| 1325 COMPILE_ASSERT(arraysize(model_types) == | 1325 COMPILE_ASSERT(arraysize(model_types) == |
| 1326 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1326 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
| 1327 UpdateCustomConfigHistogram); | 1327 UpdateCustomConfigHistogram); |
| 1328 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1328 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
| 1329 UpdateCustomConfigHistogram); | 1329 UpdateCustomConfigHistogram); |
| 1330 | 1330 |
| 1331 if (!sync_everything) { | 1331 if (!sync_everything) { |
| 1332 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1332 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1333 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1333 for (size_t i = 0; i < arraysize(model_types); ++i) { |
| 1334 const syncer::ModelType type = model_types[i]; | 1334 const syncer::ModelType type = model_types[i]; |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1926 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1926 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1927 ProfileSyncService* old_this = this; | 1927 ProfileSyncService* old_this = this; |
| 1928 this->~ProfileSyncService(); | 1928 this->~ProfileSyncService(); |
| 1929 new(old_this) ProfileSyncService( | 1929 new(old_this) ProfileSyncService( |
| 1930 new ProfileSyncComponentsFactoryImpl(profile, | 1930 new ProfileSyncComponentsFactoryImpl(profile, |
| 1931 CommandLine::ForCurrentProcess()), | 1931 CommandLine::ForCurrentProcess()), |
| 1932 profile, | 1932 profile, |
| 1933 signin, | 1933 signin, |
| 1934 behavior); | 1934 behavior); |
| 1935 } | 1935 } |
| OLD | NEW |