Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: chrome/browser/sync/profile_sync_service_session_unittest.cc

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore expectations in DTMImpl unittest + Treat observer_ as const Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698