| 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_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ |
| 6 #define COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ | 6 #define COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <unordered_map> | 11 #include <unordered_map> |
| 12 | 12 |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
| 15 #include "components/sync/base/model_type.h" | 15 #include "components/sync/base/model_type.h" |
| 16 #include "components/sync/core/attachments/attachment_uploader.h" | 16 #include "components/sync/core/attachments/attachment_uploader.h" |
| 17 #include "google_apis/gaia/oauth2_token_service_request.h" | 17 #include "google_apis/gaia/oauth2_token_service_request.h" |
| 18 #include "net/url_request/url_request_context_getter.h" | 18 #include "net/url_request/url_request_context_getter.h" |
| 19 | 19 |
| 20 class GURL; | 20 class GURL; |
| 21 | 21 |
| 22 namespace net { | 22 namespace net { |
| 23 class URLRequestContextGetter; | 23 class URLRequestContextGetter; |
| 24 } // namespace net | 24 } // namespace net |
| 25 | 25 |
| 26 namespace syncer { | 26 namespace syncer { |
| 27 | 27 |
| 28 // An implementation of AttachmentUploader. | 28 // An implementation of AttachmentUploader. |
| 29 class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader, | 29 class AttachmentUploaderImpl : public AttachmentUploader, |
| 30 public base::NonThreadSafe { | 30 public base::NonThreadSafe { |
| 31 public: | 31 public: |
| 32 // |sync_service_url| is the URL of the sync service. | 32 // |sync_service_url| is the URL of the sync service. |
| 33 // | 33 // |
| 34 // |url_request_context_getter| provides a URLRequestContext. | 34 // |url_request_context_getter| provides a URLRequestContext. |
| 35 // | 35 // |
| 36 // |account_id| is the account id to use for uploads. | 36 // |account_id| is the account id to use for uploads. |
| 37 // | 37 // |
| 38 // |scopes| is the set of scopes to use for uploads. | 38 // |scopes| is the set of scopes to use for uploads. |
| 39 // | 39 // |
| 40 // |token_service_provider| provides an OAuth2 token service. | 40 // |token_service_provider| provides an OAuth2 token service. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 // Must be last data member. | 98 // Must be last data member. |
| 99 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_; | 99 base::WeakPtrFactory<AttachmentUploaderImpl> weak_ptr_factory_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl); | 101 DISALLOW_COPY_AND_ASSIGN(AttachmentUploaderImpl); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace syncer | 104 } // namespace syncer |
| 105 | 105 |
| 106 #endif // COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ | 106 #endif // COMPONENTS_SYNC_CORE_ATTACHMENTS_ATTACHMENT_UPLOADER_IMPL_H_ |
| OLD | NEW |