OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/sync/driver/model_association_manager.h" | 5 #include "components/sync/driver/model_association_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 26 matching lines...) Expand all Loading... |
37 syncer::EXTENSION_SETTINGS, syncer::APP_SETTINGS, syncer::TYPED_URLS, | 37 syncer::EXTENSION_SETTINGS, syncer::APP_SETTINGS, syncer::TYPED_URLS, |
38 syncer::HISTORY_DELETE_DIRECTIVES, syncer::SYNCED_NOTIFICATIONS, | 38 syncer::HISTORY_DELETE_DIRECTIVES, syncer::SYNCED_NOTIFICATIONS, |
39 syncer::SYNCED_NOTIFICATION_APP_INFO, | 39 syncer::SYNCED_NOTIFICATION_APP_INFO, |
40 | 40 |
41 // UI thread data types. | 41 // UI thread data types. |
42 syncer::BOOKMARKS, | 42 syncer::BOOKMARKS, |
43 syncer::SUPERVISED_USERS, // Syncing supervised users on initial login | 43 syncer::SUPERVISED_USERS, // Syncing supervised users on initial login |
44 // might block creating a new supervised user, | 44 // might block creating a new supervised user, |
45 // so we want to do it early. | 45 // so we want to do it early. |
46 syncer::PREFERENCES, syncer::PRIORITY_PREFERENCES, syncer::EXTENSIONS, | 46 syncer::PREFERENCES, syncer::PRIORITY_PREFERENCES, syncer::EXTENSIONS, |
47 syncer::APPS, syncer::APP_LIST, syncer::ARC_PACKAGE, syncer::THEMES, | 47 syncer::APPS, syncer::APP_LIST, syncer::ARC_PACKAGE, syncer::READING_LIST, |
48 syncer::SEARCH_ENGINES, syncer::SESSIONS, syncer::APP_NOTIFICATIONS, | 48 syncer::THEMES, syncer::SEARCH_ENGINES, syncer::SESSIONS, |
49 syncer::DICTIONARY, syncer::FAVICON_IMAGES, syncer::FAVICON_TRACKING, | 49 syncer::APP_NOTIFICATIONS, syncer::DICTIONARY, syncer::FAVICON_IMAGES, |
50 syncer::PRINTERS, syncer::SUPERVISED_USER_SETTINGS, | 50 syncer::FAVICON_TRACKING, syncer::PRINTERS, |
51 syncer::SUPERVISED_USER_SHARED_SETTINGS, syncer::SUPERVISED_USER_WHITELISTS, | 51 syncer::SUPERVISED_USER_SETTINGS, syncer::SUPERVISED_USER_SHARED_SETTINGS, |
52 syncer::ARTICLES, syncer::WIFI_CREDENTIALS, | 52 syncer::SUPERVISED_USER_WHITELISTS, syncer::ARTICLES, |
| 53 syncer::WIFI_CREDENTIALS, |
53 }; | 54 }; |
54 | 55 |
55 static_assert(arraysize(kStartOrder) == | 56 static_assert(arraysize(kStartOrder) == |
56 syncer::MODEL_TYPE_COUNT - syncer::FIRST_REAL_MODEL_TYPE, | 57 syncer::MODEL_TYPE_COUNT - syncer::FIRST_REAL_MODEL_TYPE, |
57 "kStartOrder must have MODEL_TYPE_COUNT - " | 58 "kStartOrder must have MODEL_TYPE_COUNT - " |
58 "FIRST_REAL_MODEL_TYPE elements"); | 59 "FIRST_REAL_MODEL_TYPE elements"); |
59 | 60 |
60 // The amount of time we wait for association to finish. If some types haven't | 61 // The amount of time we wait for association to finish. If some types haven't |
61 // finished association by the time, DataTypeManager is notified of the | 62 // finished association by the time, DataTypeManager is notified of the |
62 // unfinished types. | 63 // unfinished types. |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 // At least one type is not ready. | 419 // At least one type is not ready. |
419 return; | 420 return; |
420 } | 421 } |
421 } | 422 } |
422 | 423 |
423 notified_about_ready_for_configure_ = true; | 424 notified_about_ready_for_configure_ = true; |
424 delegate_->OnAllDataTypesReadyForConfigure(); | 425 delegate_->OnAllDataTypesReadyForConfigure(); |
425 } | 426 } |
426 | 427 |
427 } // namespace sync_driver | 428 } // namespace sync_driver |
OLD | NEW |