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/ui_data_type_controller.h" | 5 #include "components/sync_driver/ui_data_type_controller.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/tracked_objects.h" | 10 #include "base/tracked_objects.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 preference_dtc_ = NULL; | 50 preference_dtc_ = NULL; |
51 PumpLoop(); | 51 PumpLoop(); |
52 } | 52 } |
53 | 53 |
54 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 54 base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
55 syncer::ModelType type) override { | 55 syncer::ModelType type) override { |
56 return syncable_service_.AsWeakPtr(); | 56 return syncable_service_.AsWeakPtr(); |
57 } | 57 } |
58 | 58 |
59 scoped_ptr<syncer::AttachmentService> CreateAttachmentService( | 59 scoped_ptr<syncer::AttachmentService> CreateAttachmentService( |
60 const scoped_refptr<syncer::AttachmentStore>& attachment_store, | 60 scoped_ptr<syncer::AttachmentStore> attachment_store, |
61 const syncer::UserShare& user_share, | 61 const syncer::UserShare& user_share, |
62 const std::string& store_birthday, | 62 const std::string& store_birthday, |
63 syncer::ModelType model_type, | 63 syncer::ModelType model_type, |
64 syncer::AttachmentService::Delegate* delegate) override { | 64 syncer::AttachmentService::Delegate* delegate) override { |
65 return syncer::AttachmentServiceImpl::CreateForTest(); | 65 return syncer::AttachmentServiceImpl::CreateForTest(); |
66 } | 66 } |
67 | 67 |
68 protected: | 68 protected: |
69 void SetStartExpectations() { | 69 void SetStartExpectations() { |
70 scoped_ptr<FakeGenericChangeProcessor> p( | 70 scoped_ptr<FakeGenericChangeProcessor> p( |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 EXPECT_CALL(model_load_callback_, Run(_, _)); | 194 EXPECT_CALL(model_load_callback_, Run(_, _)); |
195 syncer::SyncError error(FROM_HERE, | 195 syncer::SyncError error(FROM_HERE, |
196 syncer::SyncError::DATATYPE_ERROR, | 196 syncer::SyncError::DATATYPE_ERROR, |
197 "error", | 197 "error", |
198 syncer::PREFERENCES); | 198 syncer::PREFERENCES); |
199 preference_dtc_->OnSingleDataTypeUnrecoverableError(error); | 199 preference_dtc_->OnSingleDataTypeUnrecoverableError(error); |
200 } | 200 } |
201 | 201 |
202 } // namespace | 202 } // namespace |
203 } // namespace sync_driver | 203 } // namespace sync_driver |
OLD | NEW |