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 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 browser_sync::user_selectable_type::PREFERENCES, | 1462 browser_sync::user_selectable_type::PREFERENCES, |
1463 browser_sync::user_selectable_type::PASSWORDS, | 1463 browser_sync::user_selectable_type::PASSWORDS, |
1464 browser_sync::user_selectable_type::AUTOFILL, | 1464 browser_sync::user_selectable_type::AUTOFILL, |
1465 browser_sync::user_selectable_type::THEMES, | 1465 browser_sync::user_selectable_type::THEMES, |
1466 browser_sync::user_selectable_type::TYPED_URLS, | 1466 browser_sync::user_selectable_type::TYPED_URLS, |
1467 browser_sync::user_selectable_type::EXTENSIONS, | 1467 browser_sync::user_selectable_type::EXTENSIONS, |
1468 browser_sync::user_selectable_type::APPS, | 1468 browser_sync::user_selectable_type::APPS, |
1469 browser_sync::user_selectable_type::PROXY_TABS | 1469 browser_sync::user_selectable_type::PROXY_TABS |
1470 }; | 1470 }; |
1471 | 1471 |
1472 COMPILE_ASSERT(27 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); | 1472 COMPILE_ASSERT(28 == syncer::MODEL_TYPE_COUNT, UpdateCustomConfigHistogram); |
1473 | 1473 |
1474 if (!sync_everything) { | 1474 if (!sync_everything) { |
1475 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); | 1475 const syncer::ModelTypeSet current_types = GetPreferredDataTypes(); |
1476 | 1476 |
1477 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); | 1477 syncer::ModelTypeSet type_set = syncer::UserSelectableTypes(); |
1478 syncer::ModelTypeSet::Iterator it = type_set.First(); | 1478 syncer::ModelTypeSet::Iterator it = type_set.First(); |
1479 | 1479 |
1480 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); | 1480 DCHECK_EQ(arraysize(user_selectable_types), type_set.Size()); |
1481 | 1481 |
1482 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); | 1482 for (size_t i = 0; i < arraysize(user_selectable_types) && it.Good(); |
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. | 2110 // See http://stackoverflow.com/questions/6224121/is-new-this-myclass-undefine
d-behaviour-after-directly-calling-the-destru. |
2111 ProfileSyncService* old_this = this; | 2111 ProfileSyncService* old_this = this; |
2112 this->~ProfileSyncService(); | 2112 this->~ProfileSyncService(); |
2113 new(old_this) ProfileSyncService( | 2113 new(old_this) ProfileSyncService( |
2114 new ProfileSyncComponentsFactoryImpl(profile, | 2114 new ProfileSyncComponentsFactoryImpl(profile, |
2115 CommandLine::ForCurrentProcess()), | 2115 CommandLine::ForCurrentProcess()), |
2116 profile, | 2116 profile, |
2117 signin, | 2117 signin, |
2118 behavior); | 2118 behavior); |
2119 } | 2119 } |
OLD | NEW |