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 <map> | 5 #include <map> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 | 241 |
242 model_associator_ = | 242 model_associator_ = |
243 new SessionModelAssociator(sync_service_.get(), | 243 new SessionModelAssociator(sync_service_.get(), |
244 true /* setup_for_test */); | 244 true /* setup_for_test */); |
245 change_processor_ = new SessionChangeProcessor( | 245 change_processor_ = new SessionChangeProcessor( |
246 dtc, model_associator_, | 246 dtc, model_associator_, |
247 true /* setup_for_test */); | 247 true /* setup_for_test */); |
248 EXPECT_CALL(*factory, CreateSessionSyncComponents(_, _)). | 248 EXPECT_CALL(*factory, CreateSessionSyncComponents(_, _)). |
249 WillOnce(Return(ProfileSyncComponentsFactory::SyncComponents( | 249 WillOnce(Return(ProfileSyncComponentsFactory::SyncComponents( |
250 model_associator_, change_processor_))); | 250 model_associator_, change_processor_))); |
251 EXPECT_CALL(*factory, CreateDataTypeManager(_, _)). | 251 EXPECT_CALL(*factory, CreateDataTypeManager(_, _, _)). |
252 WillOnce(ReturnNewDataTypeManager()); | 252 WillOnce(ReturnNewDataTypeManager()); |
253 | 253 |
254 TokenServiceFactory::GetForProfile(profile())->IssueAuthTokenForTest( | 254 TokenServiceFactory::GetForProfile(profile())->IssueAuthTokenForTest( |
255 GaiaConstants::kSyncService, "token"); | 255 GaiaConstants::kSyncService, "token"); |
256 sync_service_->Initialize(); | 256 sync_service_->Initialize(); |
257 MessageLoop::current()->Run(); | 257 MessageLoop::current()->Run(); |
258 return true; | 258 return true; |
259 } | 259 } |
260 | 260 |
261 content::TestBrowserThread io_thread_; | 261 content::TestBrowserThread io_thread_; |
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 sync_pb::SessionSpecifics specifics; | 1195 sync_pb::SessionSpecifics specifics; |
1196 header.SetSessionSpecifics(specifics); | 1196 header.SetSessionSpecifics(specifics); |
1197 } | 1197 } |
1198 // Ensure we associate properly despite the pre-existing node with our local | 1198 // Ensure we associate properly despite the pre-existing node with our local |
1199 // tag. | 1199 // tag. |
1200 error = model_associator_->AssociateModels(); | 1200 error = model_associator_->AssociateModels(); |
1201 ASSERT_FALSE(error.IsSet()); | 1201 ASSERT_FALSE(error.IsSet()); |
1202 } | 1202 } |
1203 | 1203 |
1204 } // namespace browser_sync | 1204 } // namespace browser_sync |
OLD | NEW |