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

Unified Diff: chrome/browser/sync/profile_sync_components_factory_impl.cc

Issue 355093002: Consolidate attachment URL construction. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move static method declaration and definition. 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 | « no previous file | sync/api/attachments/attachment_downloader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_components_factory_impl.cc
diff --git a/chrome/browser/sync/profile_sync_components_factory_impl.cc b/chrome/browser/sync/profile_sync_components_factory_impl.cc
index b1a93fc1ce818070626774a2cde555490034b9d1..87a1c4390dda1af4f3764669a38f166a37ad17df 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -124,8 +124,6 @@ using content::BrowserThread;
namespace {
-const char kAttachmentsPath[] = "/attachments/";
-
syncer::ModelTypeSet GetDisabledTypesFromCommandLine(
const CommandLine& command_line) {
syncer::ModelTypeSet disabled_types;
@@ -144,11 +142,6 @@ syncer::ModelTypeSet GetEnabledTypesFromCommandLine(
return enabled_types;
}
-// Returns the base URL for attachments.
-std::string GetSyncServiceAttachmentsURL(const GURL& sync_service_url) {
- return sync_service_url.spec() + kAttachmentsPath;
-}
-
} // namespace
ProfileSyncComponentsFactoryImpl::ProfileSyncComponentsFactoryImpl(
@@ -631,7 +624,6 @@ OAuth2TokenService* TokenServiceProvider::GetTokenService() {
scoped_ptr<syncer::AttachmentService>
ProfileSyncComponentsFactoryImpl::CreateAttachmentService(
syncer::AttachmentService::Delegate* delegate) {
- std::string url_prefix = GetSyncServiceAttachmentsURL(sync_service_url_);
scoped_ptr<OAuth2TokenServiceRequest::TokenServiceProvider>
token_service_provider(new TokenServiceProvider(
content::BrowserThread::GetMessageLoopProxyForThread(
@@ -642,7 +634,7 @@ ProfileSyncComponentsFactoryImpl::CreateAttachmentService(
// AttachmentUploader and AttachmentDownloader instead of creating a new one
// per AttachmentService (bug 369536).
scoped_ptr<syncer::AttachmentUploader> attachment_uploader(
- new syncer::AttachmentUploaderImpl(url_prefix,
+ new syncer::AttachmentUploaderImpl(sync_service_url_,
url_request_context_getter_,
account_id_,
scope_set_,
« no previous file with comments | « no previous file | sync/api/attachments/attachment_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698