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/core/attachments/attachment_downloader.h" | 5 #include "components/sync/engine/attachments/attachment_downloader.h" |
6 | 6 |
7 #include "components/sync/core/attachments/attachment_downloader_impl.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "components/sync/engine_impl/attachments/attachment_downloader_impl.h" |
8 | 9 |
9 namespace syncer { | 10 namespace syncer { |
10 | 11 |
11 AttachmentDownloader::~AttachmentDownloader() {} | 12 AttachmentDownloader::~AttachmentDownloader() {} |
12 | 13 |
13 // Factory function for creating AttachmentDownloaderImpl. | |
14 // It is introduced to avoid SYNC_EXPORT-ing AttachmentDownloaderImpl since it | |
15 // inherits from OAuth2TokenService::Consumer which is not exported. | |
16 std::unique_ptr<AttachmentDownloader> AttachmentDownloader::Create( | 14 std::unique_ptr<AttachmentDownloader> AttachmentDownloader::Create( |
17 const GURL& sync_service_url, | 15 const GURL& sync_service_url, |
18 const scoped_refptr<net::URLRequestContextGetter>& | 16 const scoped_refptr<net::URLRequestContextGetter>& |
19 url_request_context_getter, | 17 url_request_context_getter, |
20 const std::string& account_id, | 18 const std::string& account_id, |
21 const OAuth2TokenService::ScopeSet scopes, | 19 const OAuth2TokenService::ScopeSet scopes, |
22 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>& | 20 const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>& |
23 token_service_provider, | 21 token_service_provider, |
24 const std::string& store_birthday, | 22 const std::string& store_birthday, |
25 ModelType model_type) { | 23 ModelType model_type) { |
26 return std::unique_ptr<AttachmentDownloader>(new AttachmentDownloaderImpl( | 24 return base::MakeUnique<AttachmentDownloaderImpl>( |
27 sync_service_url, url_request_context_getter, account_id, scopes, | 25 sync_service_url, url_request_context_getter, account_id, scopes, |
28 token_service_provider, store_birthday, model_type)); | 26 token_service_provider, store_birthday, model_type); |
29 } | 27 } |
30 | 28 |
31 } // namespace syncer | 29 } // namespace syncer |
OLD | NEW |