| 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 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 browser_sync::user_selectable_type::AUTOFILL, | 1112 browser_sync::user_selectable_type::AUTOFILL, |
| 1113 browser_sync::user_selectable_type::BOOKMARKS, | 1113 browser_sync::user_selectable_type::BOOKMARKS, |
| 1114 browser_sync::user_selectable_type::EXTENSIONS, | 1114 browser_sync::user_selectable_type::EXTENSIONS, |
| 1115 browser_sync::user_selectable_type::PASSWORDS, | 1115 browser_sync::user_selectable_type::PASSWORDS, |
| 1116 browser_sync::user_selectable_type::PREFERENCES, | 1116 browser_sync::user_selectable_type::PREFERENCES, |
| 1117 browser_sync::user_selectable_type::SESSIONS, | 1117 browser_sync::user_selectable_type::SESSIONS, |
| 1118 browser_sync::user_selectable_type::THEMES, | 1118 browser_sync::user_selectable_type::THEMES, |
| 1119 browser_sync::user_selectable_type::TYPED_URLS | 1119 browser_sync::user_selectable_type::TYPED_URLS |
| 1120 }; | 1120 }; |
| 1121 | 1121 |
| 1122 COMPILE_ASSERT(17 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1122 COMPILE_ASSERT(19 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
| 1123 COMPILE_ASSERT(arraysize(model_types) == | 1123 COMPILE_ASSERT(arraysize(model_types) == |
| 1124 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1124 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
| 1125 UpdateCustomConfigHistogram); | 1125 UpdateCustomConfigHistogram); |
| 1126 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1126 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
| 1127 UpdateCustomConfigHistogram); | 1127 UpdateCustomConfigHistogram); |
| 1128 | 1128 |
| 1129 if (!sync_everything) { | 1129 if (!sync_everything) { |
| 1130 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1130 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
| 1131 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1131 for (size_t i = 0; i < arraysize(model_types); ++i) { |
| 1132 const syncer::ModelType type = model_types[i]; | 1132 const syncer::ModelType type = model_types[i]; |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1811 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
| 1812 ProfileSyncService* old_this = this; | 1812 ProfileSyncService* old_this = this; |
| 1813 this->~ProfileSyncService(); | 1813 this->~ProfileSyncService(); |
| 1814 new(old_this) ProfileSyncService( | 1814 new(old_this) ProfileSyncService( |
| 1815 new ProfileSyncComponentsFactoryImpl(profile, | 1815 new ProfileSyncComponentsFactoryImpl(profile, |
| 1816 CommandLine::ForCurrentProcess()), | 1816 CommandLine::ForCurrentProcess()), |
| 1817 profile, | 1817 profile, |
| 1818 signin, | 1818 signin, |
| 1819 behavior); | 1819 behavior); |
| 1820 } | 1820 } |
| OLD | NEW |