| 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 std::vector<syncer::AttachmentIdSet> attachment_id_sets_; | 49 std::vector<syncer::AttachmentIdSet> attachment_id_sets_; |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 MockAttachmentService::MockAttachmentService( | 52 MockAttachmentService::MockAttachmentService( |
| 53 const scoped_refptr<syncer::AttachmentStore>& attachment_store) | 53 const scoped_refptr<syncer::AttachmentStore>& attachment_store) |
| 54 : AttachmentServiceImpl(attachment_store, | 54 : AttachmentServiceImpl(attachment_store, |
| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 syncer::ReadNode node(&read_transaction); | 429 syncer::ReadNode node(&read_transaction); |
| 428 ASSERT_EQ(node.InitByClientTagLookup(syncer::PREFERENCES, tag), | 430 ASSERT_EQ(node.InitByClientTagLookup(syncer::PREFERENCES, tag), |
| 429 syncer::BaseNode::INIT_OK); | 431 syncer::BaseNode::INIT_OK); |
| 430 syncer::AttachmentIdList attachment_ids = node.GetAttachmentIds(); | 432 syncer::AttachmentIdList attachment_ids = node.GetAttachmentIds(); |
| 431 EXPECT_EQ(1U, attachment_ids.size()); | 433 EXPECT_EQ(1U, attachment_ids.size()); |
| 432 } | 434 } |
| 433 | 435 |
| 434 } // namespace | 436 } // namespace |
| 435 | 437 |
| 436 } // namespace sync_driver | 438 } // namespace sync_driver |
| OLD | NEW |