| 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 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1217 browser_sync::user_selectable_type::AUTOFILL, | 1217 browser_sync::user_selectable_type::AUTOFILL, |
| 1218 browser_sync::user_selectable_type::BOOKMARKS, | 1218 browser_sync::user_selectable_type::BOOKMARKS, |
| 1219 browser_sync::user_selectable_type::EXTENSIONS, | 1219 browser_sync::user_selectable_type::EXTENSIONS, |
| 1220 browser_sync::user_selectable_type::PASSWORDS, | 1220 browser_sync::user_selectable_type::PASSWORDS, |
| 1221 browser_sync::user_selectable_type::PREFERENCES, | 1221 browser_sync::user_selectable_type::PREFERENCES, |
| 1222 browser_sync::user_selectable_type::SESSIONS, | 1222 browser_sync::user_selectable_type::SESSIONS, |
| 1223 browser_sync::user_selectable_type::THEMES, | 1223 browser_sync::user_selectable_type::THEMES, |
| 1224 browser_sync::user_selectable_type::TYPED_URLS | 1224 browser_sync::user_selectable_type::TYPED_URLS |
| 1225 }; | 1225 }; |
| 1226 | 1226 |
| 1227 COMPILE_ASSERT(17 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1227 COMPILE_ASSERT(18 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
| 1228 COMPILE_ASSERT(arraysize(model_types) == | 1228 COMPILE_ASSERT(arraysize(model_types) == |
| 1229 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1229 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
| 1230 UpdateCustomConfigHistogram); | 1230 UpdateCustomConfigHistogram); |
| 1231 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1231 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
| 1232 UpdateCustomConfigHistogram); | 1232 UpdateCustomConfigHistogram); |
| 1233 | 1233 |
| 1234 if (!sync_everything) { | 1234 if (!sync_everything) { |
| 1235 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1235 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1236 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1236 for (size_t i = 0; i < arraysize(model_types); ++i) { |
| 1237 const syncer::ModelType type = model_types[i]; | 1237 const syncer::ModelType type = model_types[i]; |
| (...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1808 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1808 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1809 ProfileSyncService* old_this = this; | 1809 ProfileSyncService* old_this = this; |
| 1810 this->~ProfileSyncService(); | 1810 this->~ProfileSyncService(); |
| 1811 new(old_this) ProfileSyncService( | 1811 new(old_this) ProfileSyncService( |
| 1812 new ProfileSyncComponentsFactoryImpl(profile, | 1812 new ProfileSyncComponentsFactoryImpl(profile, |
| 1813 CommandLine::ForCurrentProcess()), | 1813 CommandLine::ForCurrentProcess()), |
| 1814 profile, | 1814 profile, |
| 1815 signin, | 1815 signin, |
| 1816 behavior); | 1816 behavior); |
| 1817 } | 1817 } |
| OLD | NEW |