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

Unified Diff: sync/internal_api/public/attachments/attachment_uploader_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
« no previous file with comments | « sync/internal_api/public/attachments/attachment_downloader_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/internal_api/public/attachments/attachment_uploader_impl.h
diff --git a/sync/internal_api/public/attachments/attachment_uploader_impl.h b/sync/internal_api/public/attachments/attachment_uploader_impl.h
index 25394fc54b8d881999540194bc3cad06e71bf87a..8604415e03e8990d15b644beeac9812c3b1fd2c9 100644
--- a/sync/internal_api/public/attachments/attachment_uploader_impl.h
+++ b/sync/internal_api/public/attachments/attachment_uploader_impl.h
@@ -23,7 +23,8 @@
class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader,
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
+ // uploading attachments.
//
// |url_request_context_getter| provides a URLRequestContext.
//
@@ -33,7 +34,7 @@
//
// |token_service_provider| provides an OAuth2 token service.
AttachmentUploaderImpl(
- const GURL& sync_service_url,
+ const std::string& url_prefix,
const scoped_refptr<net::URLRequestContextGetter>&
url_request_context_getter,
const std::string& account_id,
@@ -46,18 +47,15 @@
virtual void UploadAttachment(const Attachment& attachment,
const UploadCallback& callback) OVERRIDE;
- // Return the URL for the given |sync_service_url| and |attachment_id|.
- static GURL GetURLForAttachmentId(const GURL& sync_service_url,
- const AttachmentId& attachment_id);
-
private:
class UploadState;
typedef std::string UniqueId;
typedef base::ScopedPtrHashMap<UniqueId, UploadState> StateMap;
+ GURL GetUploadURLForAttachmentId(const AttachmentId& attachment_id) const;
void DeleteUploadStateFor(const UniqueId& unique_id);
- GURL sync_service_url_;
+ std::string url_prefix_;
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
std::string account_id_;
OAuth2TokenService::ScopeSet scopes_;
« no previous file with comments | « sync/internal_api/public/attachments/attachment_downloader_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698