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 8604415e03e8990d15b644beeac9812c3b1fd2c9..558c6ed0b99514be1a8980a762d9a5a7397b94a8 100644 |
--- a/sync/internal_api/public/attachments/attachment_uploader_impl.h |
+++ b/sync/internal_api/public/attachments/attachment_uploader_impl.h |
@@ -23,8 +23,11 @@ namespace syncer { |
class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader, |
public base::NonThreadSafe { |
public: |
- // |url_prefix| is the URL prefix (including trailing slash) to be used when |
- // uploading attachments. |
+ // Return the URL for the given |sync_service_url| and |attachment_id|. |
+ static GURL GetURLForAttachmentId(const GURL& sync_service_url, |
pavely
2014/06/26 21:09:03
nit: In chromium code I saw static methods declare
maniscalco
2014/06/26 21:31:33
Good catch. Done.
|
+ const AttachmentId& attachment_id); |
+ |
+ // |sync_service_url| is the URL of the sync service. |
// |
// |url_request_context_getter| provides a URLRequestContext. |
// |
@@ -34,7 +37,7 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader, |
// |
// |token_service_provider| provides an OAuth2 token service. |
AttachmentUploaderImpl( |
- const std::string& url_prefix, |
+ const GURL& sync_service_url, |
const scoped_refptr<net::URLRequestContextGetter>& |
url_request_context_getter, |
const std::string& account_id, |
@@ -55,7 +58,7 @@ class SYNC_EXPORT AttachmentUploaderImpl : public AttachmentUploader, |
GURL GetUploadURLForAttachmentId(const AttachmentId& attachment_id) const; |
void DeleteUploadStateFor(const UniqueId& unique_id); |
- std::string url_prefix_; |
+ GURL sync_service_url_; |
scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; |
std::string account_id_; |
OAuth2TokenService::ScopeSet scopes_; |