| 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/generic_change_processor.h" | 5 #include "components/sync_driver/generic_change_processor.h" |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 MockAttachmentService::MockAttachmentService() | 51 MockAttachmentService::MockAttachmentService() |
| 52 : AttachmentServiceImpl( | 52 : AttachmentServiceImpl( |
| 53 scoped_ptr<syncer::AttachmentStore>(new syncer::FakeAttachmentStore( | 53 scoped_ptr<syncer::AttachmentStore>(new syncer::FakeAttachmentStore( |
| 54 base::MessageLoopProxy::current())), | 54 base::MessageLoopProxy::current())), |
| 55 scoped_ptr<syncer::AttachmentUploader>( | 55 scoped_ptr<syncer::AttachmentUploader>( |
| 56 new syncer::FakeAttachmentUploader), | 56 new syncer::FakeAttachmentUploader), |
| 57 scoped_ptr<syncer::AttachmentDownloader>( | 57 scoped_ptr<syncer::AttachmentDownloader>( |
| 58 new syncer::FakeAttachmentDownloader), | 58 new syncer::FakeAttachmentDownloader), |
| 59 NULL) { | 59 NULL, |
| 60 base::TimeDelta(), |
| 61 base::TimeDelta()) { |
| 60 } | 62 } |
| 61 | 63 |
| 62 MockAttachmentService::~MockAttachmentService() { | 64 MockAttachmentService::~MockAttachmentService() { |
| 63 } | 65 } |
| 64 | 66 |
| 65 void MockAttachmentService::UploadAttachments( | 67 void MockAttachmentService::UploadAttachments( |
| 66 const syncer::AttachmentIdSet& attachment_ids) { | 68 const syncer::AttachmentIdSet& attachment_ids) { |
| 67 attachment_id_sets_.push_back(attachment_ids); | 69 attachment_id_sets_.push_back(attachment_ids); |
| 68 AttachmentServiceImpl::UploadAttachments(attachment_ids); | 70 AttachmentServiceImpl::UploadAttachments(attachment_ids); |
| 69 } | 71 } |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 syncer::ReadNode node(&read_transaction); | 424 syncer::ReadNode node(&read_transaction); |
| 423 ASSERT_EQ(node.InitByClientTagLookup(syncer::PREFERENCES, tag), | 425 ASSERT_EQ(node.InitByClientTagLookup(syncer::PREFERENCES, tag), |
| 424 syncer::BaseNode::INIT_OK); | 426 syncer::BaseNode::INIT_OK); |
| 425 syncer::AttachmentIdList attachment_ids = node.GetAttachmentIds(); | 427 syncer::AttachmentIdList attachment_ids = node.GetAttachmentIds(); |
| 426 EXPECT_EQ(1U, attachment_ids.size()); | 428 EXPECT_EQ(1U, attachment_ids.size()); |
| 427 } | 429 } |
| 428 | 430 |
| 429 } // namespace | 431 } // namespace |
| 430 | 432 |
| 431 } // namespace sync_driver | 433 } // namespace sync_driver |
| OLD | NEW |