| 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 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "sync/api/syncable_service.h" | 10 #include "sync/api/syncable_service.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( | 25 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( |
| 26 syncer::ModelType type) = 0; | 26 syncer::ModelType type) = 0; |
| 27 | 27 |
| 28 // Creates attachment service. | 28 // Creates attachment service. |
| 29 // Note: Should only be called from the model type thread. | 29 // Note: Should only be called from the model type thread. |
| 30 // |delegate| is optional delegate for AttachmentService to notify about | 30 // |delegate| is optional delegate for AttachmentService to notify about |
| 31 // asynchronous events (AttachmentUploaded). Pass NULL if delegate is not | 31 // asynchronous events (AttachmentUploaded). Pass NULL if delegate is not |
| 32 // provided. AttachmentService doesn't take ownership of delegate, the pointer | 32 // provided. AttachmentService doesn't take ownership of delegate, the pointer |
| 33 // must be valid throughout AttachmentService lifetime. | 33 // must be valid throughout AttachmentService lifetime. |
| 34 virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService( | 34 virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService( |
| 35 const scoped_refptr<syncer::AttachmentStore>& attachment_store, |
| 35 const syncer::UserShare& user_share, | 36 const syncer::UserShare& user_share, |
| 36 syncer::AttachmentService::Delegate* delegate) = 0; | 37 syncer::AttachmentService::Delegate* delegate) = 0; |
| 37 }; | 38 }; |
| 38 | 39 |
| 39 } // namespace sync_driver | 40 } // namespace sync_driver |
| 40 | 41 |
| 41 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ | 42 #endif // COMPONENTS_SYNC_DRIVER_SYNC_API_COMPONENT_FACTORY_H_ |
| OLD | NEW |