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

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

Issue 548373003: Move AttachmentStore ownership to datatype (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create AttachmentService in GenericChangeProcessor if AttachmentStore is NULL Created 6 years, 3 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: 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 b0881df0948a05013780f4b8d5554af81cedb48f..a54c72671d8c1d2fd4e5fc9be63c55e12d87fe46 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -595,13 +595,9 @@ OAuth2TokenService* TokenServiceProvider::GetTokenService() {
scoped_ptr<syncer::AttachmentService>
ProfileSyncComponentsFactoryImpl::CreateAttachmentService(
+ const scoped_refptr<syncer::AttachmentStore>& attachment_store,
const syncer::UserShare& user_share,
syncer::AttachmentService::Delegate* delegate) {
-
- scoped_ptr<syncer::AttachmentStore> attachment_store(
- new syncer::FakeAttachmentStore(
- BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)));
-
scoped_ptr<syncer::AttachmentUploader> attachment_uploader;
scoped_ptr<syncer::AttachmentDownloader> attachment_downloader;
// Only construct an AttachmentUploader and AttachmentDownload if we have sync
@@ -637,7 +633,7 @@ ProfileSyncComponentsFactoryImpl::CreateAttachmentService(
}
scoped_ptr<syncer::AttachmentService> attachment_service(
- new syncer::AttachmentServiceImpl(attachment_store.Pass(),
+ new syncer::AttachmentServiceImpl(attachment_store,
attachment_uploader.Pass(),
attachment_downloader.Pass(),
delegate));

Powered by Google App Engine
This is Rietveld 408576698