summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/attachments/attachment_downloader.cc
blob: fb6020130f45171c4a1a16139b62f8609cc58ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "sync/internal_api/public/attachments/attachment_downloader.h"

#include "sync/internal_api/public/attachments/attachment_downloader_impl.h"

namespace syncer {

AttachmentDownloader::~AttachmentDownloader() {
}

// Factory function for creating AttachmentDownloaderImpl.
// It is introduced to avoid SYNC_EXPORT-ing AttachmentDownloaderImpl since it
// inherits from OAuth2TokenService::Consumer which is not exported.
scoped_ptr<AttachmentDownloader> AttachmentDownloader::Create(
    const GURL& sync_service_url,
    const scoped_refptr<net::URLRequestContextGetter>&
        url_request_context_getter,
    const std::string& account_id,
    const OAuth2TokenService::ScopeSet scopes,
    const scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>&
        token_service_provider,
    const std::string& store_birthday) {
  return scoped_ptr<AttachmentDownloader>(new AttachmentDownloaderImpl(
      sync_service_url, url_request_context_getter, account_id, scopes,
      token_service_provider, store_birthday));
}

}  // namespace syncer