| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 const base::TimeDelta& initial_backoff_delay, | 57 const base::TimeDelta& initial_backoff_delay, |
| 58 const base::TimeDelta& max_backoff_delay); | 58 const base::TimeDelta& max_backoff_delay); |
| 59 ~AttachmentServiceImpl() override; | 59 ~AttachmentServiceImpl() override; |
| 60 | 60 |
| 61 // Create an AttachmentServiceImpl suitable for use in tests. | 61 // Create an AttachmentServiceImpl suitable for use in tests. |
| 62 static scoped_ptr<syncer::AttachmentService> CreateForTest(); | 62 static scoped_ptr<syncer::AttachmentService> CreateForTest(); |
| 63 | 63 |
| 64 // AttachmentService implementation. | 64 // AttachmentService implementation. |
| 65 void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids, | 65 void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids, |
| 66 const GetOrDownloadCallback& callback) override; | 66 const GetOrDownloadCallback& callback) override; |
| 67 void UploadAttachments(const AttachmentIdSet& attachment_ids) override; | 67 void UploadAttachments(const AttachmentIdList& attachment_ids) override; |
| 68 | 68 |
| 69 // NetworkChangeObserver implementation. | 69 // NetworkChangeObserver implementation. |
| 70 void OnNetworkChanged( | 70 void OnNetworkChanged( |
| 71 net::NetworkChangeNotifier::ConnectionType type) override; | 71 net::NetworkChangeNotifier::ConnectionType type) override; |
| 72 | 72 |
| 73 // Use |timer| in the underlying TaskQueue. | 73 // Use |timer| in the underlying TaskQueue. |
| 74 // | 74 // |
| 75 // Used in tests. See also MockTimer. | 75 // Used in tests. See also MockTimer. |
| 76 void SetTimerForTest(scoped_ptr<base::Timer> timer); | 76 void SetTimerForTest(scoped_ptr<base::Timer> timer); |
| 77 | 77 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 // Must be last data member. | 113 // Must be last data member. |
| 114 base::WeakPtrFactory<AttachmentServiceImpl> weak_ptr_factory_; | 114 base::WeakPtrFactory<AttachmentServiceImpl> weak_ptr_factory_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(AttachmentServiceImpl); | 116 DISALLOW_COPY_AND_ASSIGN(AttachmentServiceImpl); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace syncer | 119 } // namespace syncer |
| 120 | 120 |
| 121 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ | 121 #endif // SYNC_INTERNAL_API_PUBLIC_ATTACHMENTS_ATTACHMENT_SERVICE_IMPL_H_ |
| OLD | NEW |