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 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 browser_sync::user_selectable_type::AUTOFILL, | 1093 browser_sync::user_selectable_type::AUTOFILL, |
1094 browser_sync::user_selectable_type::BOOKMARKS, | 1094 browser_sync::user_selectable_type::BOOKMARKS, |
1095 browser_sync::user_selectable_type::EXTENSIONS, | 1095 browser_sync::user_selectable_type::EXTENSIONS, |
1096 browser_sync::user_selectable_type::PASSWORDS, | 1096 browser_sync::user_selectable_type::PASSWORDS, |
1097 browser_sync::user_selectable_type::PREFERENCES, | 1097 browser_sync::user_selectable_type::PREFERENCES, |
1098 browser_sync::user_selectable_type::SESSIONS, | 1098 browser_sync::user_selectable_type::SESSIONS, |
1099 browser_sync::user_selectable_type::THEMES, | 1099 browser_sync::user_selectable_type::THEMES, |
1100 browser_sync::user_selectable_type::TYPED_URLS | 1100 browser_sync::user_selectable_type::TYPED_URLS |
1101 }; | 1101 }; |
1102 | 1102 |
1103 COMPILE_ASSERT(17 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1103 COMPILE_ASSERT(18 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
1104 COMPILE_ASSERT(arraysize(model_types) == | 1104 COMPILE_ASSERT(arraysize(model_types) == |
1105 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, | 1105 browser_sync::user_selectable_type::SELECTABLE_DATATYPE_COUNT, |
1106 UpdateCustomConfigHistogram); | 1106 UpdateCustomConfigHistogram); |
1107 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), | 1107 COMPILE_ASSERT(arraysize(model_types) == arraysize(user_selectable_types), |
1108 UpdateCustomConfigHistogram); | 1108 UpdateCustomConfigHistogram); |
1109 | 1109 |
1110 if (!sync_everything) { | 1110 if (!sync_everything) { |
1111 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1111 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
1112 for (size_t i = 0; i < arraysize(model_types); ++i) { | 1112 for (size_t i = 0; i < arraysize(model_types); ++i) { |
1113 const syncer::ModelType type = model_types[i]; | 1113 const syncer::ModelType type = model_types[i]; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1792 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 1792 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
1793 ProfileSyncService* old_this = this; | 1793 ProfileSyncService* old_this = this; |
1794 this->~ProfileSyncService(); | 1794 this->~ProfileSyncService(); |
1795 new(old_this) ProfileSyncService( | 1795 new(old_this) ProfileSyncService( |
1796 new ProfileSyncComponentsFactoryImpl(profile, | 1796 new ProfileSyncComponentsFactoryImpl(profile, |
1797 CommandLine::ForCurrentProcess()), | 1797 CommandLine::ForCurrentProcess()), |
1798 profile, | 1798 profile, |
1799 signin, | 1799 signin, |
1800 behavior); | 1800 behavior); |
1801 } | 1801 } |
OLD | NEW |