| 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 SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 scoped_ptr<AttachmentDownloader> attachment_downloader, | 52 scoped_ptr<AttachmentDownloader> attachment_downloader, |
| 53 Delegate* delegate, | 53 Delegate* delegate, |
| 54 const base::TimeDelta& initial_backoff_delay, | 54 const base::TimeDelta& initial_backoff_delay, |
| 55 const base::TimeDelta& max_backoff_delay); | 55 const base::TimeDelta& max_backoff_delay); |
| 56 virtual ~AttachmentServiceImpl(); | 56 virtual ~AttachmentServiceImpl(); |
| 57 | 57 |
| 58 // Create an AttachmentServiceImpl suitable for use in tests. | 58 // Create an AttachmentServiceImpl suitable for use in tests. |
| 59 static scoped_ptr<syncer::AttachmentService> CreateForTest(); | 59 static scoped_ptr<syncer::AttachmentService> CreateForTest(); |
| 60 | 60 |
| 61 // AttachmentService implementation. | 61 // AttachmentService implementation. |
| 62 virtual AttachmentStore* GetStore() OVERRIDE; | 62 virtual AttachmentStore* GetStore() override; |
| 63 virtual void GetOrDownloadAttachments( | 63 virtual void GetOrDownloadAttachments( |
| 64 const AttachmentIdList& attachment_ids, | 64 const AttachmentIdList& attachment_ids, |
| 65 const GetOrDownloadCallback& callback) OVERRIDE; | 65 const GetOrDownloadCallback& callback) override; |
| 66 virtual void DropAttachments(const AttachmentIdList& attachment_ids, | 66 virtual void DropAttachments(const AttachmentIdList& attachment_ids, |
| 67 const DropCallback& callback) OVERRIDE; | 67 const DropCallback& callback) override; |
| 68 virtual void UploadAttachments( | 68 virtual void UploadAttachments( |
| 69 const AttachmentIdSet& attachment_ids) OVERRIDE; | 69 const AttachmentIdSet& attachment_ids) override; |
| 70 | 70 |
| 71 // NetworkChangeObserver implementation. | 71 // NetworkChangeObserver implementation. |
| 72 virtual void OnNetworkChanged( | 72 virtual void OnNetworkChanged( |
| 73 net::NetworkChangeNotifier::ConnectionType type) OVERRIDE; | 73 net::NetworkChangeNotifier::ConnectionType type) override; |
| 74 | 74 |
| 75 // Use |timer| in the underlying TaskQueue. | 75 // Use |timer| in the underlying TaskQueue. |
| 76 // | 76 // |
| 77 // Used in tests. See also MockTimer. | 77 // Used in tests. See also MockTimer. |
| 78 void SetTimerForTest(scoped_ptr<base::Timer> timer); | 78 void SetTimerForTest(scoped_ptr<base::Timer> timer); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 class GetOrDownloadState; | 81 class GetOrDownloadState; |
| 82 | 82 |
| 83 void ReadDone(const scoped_refptr<GetOrDownloadState>& state, | 83 void ReadDone(const scoped_refptr<GetOrDownloadState>& state, |
| (...skipping 29 matching lines...) Expand all Loading... |
| 113 | 113 |
| 114 // Must be last data member. | 114 // Must be last data member. |
| 115 base::WeakPtrFactory<AttachmentServiceImpl> weak_ptr_factory_; | 115 base::WeakPtrFactory<AttachmentServiceImpl> weak_ptr_factory_; |
| 116 | 116 |
| 117 DISALLOW_COPY_AND_ASSIGN(AttachmentServiceImpl); | 117 DISALLOW_COPY_AND_ASSIGN(AttachmentServiceImpl); |
| 118 }; | 118 }; |
| 119 | 119 |
| 120 } // namespace syncer | 120 } // namespace syncer |
| 121 | 121 |
| 122 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ | 122 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ |
| OLD | NEW |