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
3 // found in the LICENSE file.
5 #include "sync/internal_api/public/attachments/attachment_downloader.h"
7 #include "sync/internal_api/public/attachments/attachment_downloader_impl.h"
11 AttachmentDownloader::~AttachmentDownloader() {
14 // Factory function for creating AttachmentDownloaderImpl.
15 // It is introduced to avoid SYNC_EXPORT-ing AttachmentDownloaderImpl since it
16 // inherits from OAuth2TokenService::Consumer which is not exported.
17 scoped_ptr
<AttachmentDownloader
> AttachmentDownloader::Create(
18 const GURL
& sync_service_url
,
19 const scoped_refptr
<net::URLRequestContextGetter
>&
20 url_request_context_getter
,
21 const std::string
& account_id
,
22 const OAuth2TokenService::ScopeSet scopes
,
23 const scoped_refptr
<OAuth2TokenServiceRequest::TokenServiceProvider
>&
24 token_service_provider
,
25 const std::string
& store_birthday
,
26 ModelType model_type
) {
27 return scoped_ptr
<AttachmentDownloader
>(new AttachmentDownloaderImpl(
28 sync_service_url
, url_request_context_getter
, account_id
, scopes
,
29 token_service_provider
, store_birthday
, model_type
));