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/test_profile_sync_service.h" | 5 #include "chrome/browser/sync/test_profile_sync_service.h" |
6 | 6 |
7 #include "chrome/browser/signin/signin_manager.h" | 7 #include "chrome/browser/signin/signin_manager.h" |
8 #include "chrome/browser/sync/glue/data_type_controller.h" | 8 #include "chrome/browser/sync/glue/data_type_controller.h" |
9 #include "chrome/browser/sync/glue/sync_backend_host.h" | 9 #include "chrome/browser/sync/glue/sync_backend_host.h" |
10 #include "chrome/browser/sync/profile_sync_components_factory.h" | 10 #include "chrome/browser/sync/profile_sync_components_factory.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 UserShare* user_share = GetUserShare(); | 124 UserShare* user_share = GetUserShare(); |
125 Directory* directory = user_share->directory.get(); | 125 Directory* directory = user_share->directory.get(); |
126 | 126 |
127 if (!directory->initial_sync_ended_for_type(NIGORI)) { | 127 if (!directory->initial_sync_ended_for_type(NIGORI)) { |
128 syncer::TestUserShare::CreateRoot(NIGORI, user_share); | 128 syncer::TestUserShare::CreateRoot(NIGORI, user_share); |
129 | 129 |
130 // A side effect of adding the NIGORI mode (normally done by the | 130 // A side effect of adding the NIGORI mode (normally done by the |
131 // syncer) is a decryption attempt, which will fail the first time. | 131 // syncer) is a decryption attempt, which will fail the first time. |
132 } | 132 } |
133 | 133 |
| 134 if (!directory->initial_sync_ended_for_type(DEVICE_INFO)) { |
| 135 syncer::TestUserShare::CreateRoot(DEVICE_INFO, user_share); |
| 136 } |
| 137 |
134 if (!directory->initial_sync_ended_for_type(EXPERIMENTS)) { | 138 if (!directory->initial_sync_ended_for_type(EXPERIMENTS)) { |
135 syncer::TestUserShare::CreateRoot(EXPERIMENTS, user_share); | 139 syncer::TestUserShare::CreateRoot(EXPERIMENTS, user_share); |
136 } | 140 } |
137 | 141 |
138 SetInitialSyncEndedForAllTypes(); | 142 SetInitialSyncEndedForAllTypes(); |
139 restored_types = syncer::ModelTypeSet::All(); | 143 restored_types = syncer::ModelTypeSet::All(); |
140 } | 144 } |
141 } | 145 } |
142 | 146 |
143 SyncBackendHost::HandleSyncManagerInitializationOnFrontendLoop( | 147 SyncBackendHost::HandleSyncManagerInitializationOnFrontendLoop( |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 profile(), | 251 profile(), |
248 sync_prefs_.AsWeakPtr(), | 252 sync_prefs_.AsWeakPtr(), |
249 invalidator_storage_.AsWeakPtr(), | 253 invalidator_storage_.AsWeakPtr(), |
250 id_factory_, | 254 id_factory_, |
251 callback_, | 255 callback_, |
252 set_initial_sync_ended_on_init_, | 256 set_initial_sync_ended_on_init_, |
253 synchronous_backend_initialization_, | 257 synchronous_backend_initialization_, |
254 fail_initial_download_, | 258 fail_initial_download_, |
255 storage_option_)); | 259 storage_option_)); |
256 } | 260 } |
OLD | NEW |