Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: sync/internal_api/public/attachments/attachment_downloader_impl.h

Issue 356953009: Revert of Consolidate attachment URL construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sync/internal_api/public/attachments/attachment_downloader_impl.h
diff --git a/sync/internal_api/public/attachments/attachment_downloader_impl.h b/sync/internal_api/public/attachments/attachment_downloader_impl.h
index 3a125c07153e9d0f58dbcd5473f4bb6c7716605d..e3fee399e95ff63045df10ea93a7ccb260c01ce7 100644
--- a/sync/internal_api/public/attachments/attachment_downloader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_downloader_impl.h
@@ -11,7 +11,6 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "net/url_request/url_request_context_getter.h"
#include "sync/api/attachments/attachment_downloader.h"
-#include "url/gurl.h"
namespace syncer {
@@ -21,7 +20,8 @@
public net::URLFetcherDelegate,
public base::NonThreadSafe {
public:
- // |sync_service_url| is the URL of the sync service.
+ // |url_prefix| is the URL prefix (including trailing slash) to be used when
+ // downloading attachments.
//
// |url_request_context_getter| provides a URLRequestContext.
//
@@ -31,7 +31,7 @@
//
// |token_service_provider| provides an OAuth2 token service.
AttachmentDownloaderImpl(
- const GURL& sync_service_url,
+ const std::string& url_prefix,
const scoped_refptr<net::URLRequestContextGetter>&
url_request_context_getter,
const std::string& account_id,
@@ -60,6 +60,7 @@
typedef base::ScopedPtrHashMap<AttachmentUrl, DownloadState> StateMap;
typedef std::vector<DownloadState*> StateList;
+ AttachmentUrl GetAttachmentUrl(const AttachmentId& attachment_id);
scoped_ptr<net::URLFetcher> CreateFetcher(const AttachmentUrl& url,
const std::string& access_token);
void RequestAccessToken(DownloadState* download_state);
@@ -68,7 +69,7 @@
const DownloadResult& result,
const scoped_refptr<base::RefCountedString>& attachment_data);
- GURL sync_service_url_;
+ std::string url_prefix_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
std::string account_id_;

Powered by Google App Engine
This is Rietveld 408576698