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

Unified Diff: components/sync_driver/generic_change_processor_unittest.cc

Issue 548373003: Move AttachmentStore ownership to datatype (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SyncableService related changes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/sync_driver/generic_change_processor_unittest.cc
diff --git a/components/sync_driver/generic_change_processor_unittest.cc b/components/sync_driver/generic_change_processor_unittest.cc
index bdd72662473f2e6e6591fa809c7a73f8fafe39e5..674a6811e33614b5df54ded65ce7a3b56d30eed1 100644
--- a/components/sync_driver/generic_change_processor_unittest.cc
+++ b/components/sync_driver/generic_change_processor_unittest.cc
@@ -47,14 +47,14 @@ class MockAttachmentService : public syncer::AttachmentServiceImpl {
};
MockAttachmentService::MockAttachmentService()
- : AttachmentServiceImpl(
- scoped_ptr<syncer::AttachmentStore>(new syncer::FakeAttachmentStore(
- base::MessageLoopProxy::current())),
- scoped_ptr<syncer::AttachmentUploader>(
- new syncer::FakeAttachmentUploader),
- scoped_ptr<syncer::AttachmentDownloader>(
- new syncer::FakeAttachmentDownloader),
- NULL) {
+ : AttachmentServiceImpl(scoped_refptr<syncer::AttachmentStore>(
+ new syncer::FakeAttachmentStore(
+ base::MessageLoopProxy::current())),
+ scoped_ptr<syncer::AttachmentUploader>(
+ new syncer::FakeAttachmentUploader),
+ scoped_ptr<syncer::AttachmentDownloader>(
+ new syncer::FakeAttachmentDownloader),
+ NULL) {
}
MockAttachmentService::~MockAttachmentService() {
@@ -87,6 +87,7 @@ class MockSyncApiComponentFactory : public SyncApiComponentFactory {
}
virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService(
+ const scoped_refptr<syncer::AttachmentStore>& attachment_store,
const syncer::UserShare& user_share,
syncer::AttachmentService::Delegate* delegate) OVERRIDE {
EXPECT_TRUE(attachment_service_ != NULL);
@@ -131,7 +132,8 @@ class SyncGenericChangeProcessorTest : public testing::Test {
syncable_service_ptr_factory_.GetWeakPtr(),
merge_result_ptr_factory_.GetWeakPtr(),
test_user_share_.user_share(),
- sync_factory_.get()));
+ sync_factory_.get(),
+ scoped_refptr<syncer::AttachmentStore>()));
}
virtual void TearDown() OVERRIDE {

Powered by Google App Engine
This is Rietveld 408576698