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

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

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Add AttachmentServiceBase allowing us to drop AsWeakPtr and RefCountedThreadSafe from AttachmentServiceProxy. Created 6 years, 9 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 44f5a5b662832cb99ec05b505c7ff85eed1e7566..76978c6dec84b42b81fe3a50de4389a1815abbf2 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -63,6 +63,9 @@
#include "components/sync_driver/proxy_data_type_controller.h"
#include "content/public/browser/browser_thread.h"
#include "extensions/browser/extension_system.h"
+#include "sync/api/attachments/attachment_service.h"
+#include "sync/api/attachments/fake_attachment_service.h"
+#include "sync/api/attachments/fake_attachment_store.h"
#include "sync/api/syncable_service.h"
#if defined(ENABLE_EXTENSIONS)
@@ -444,10 +447,19 @@ browser_sync::GenericChangeProcessor*
const base::WeakPtr<syncer::SyncableService>& local_service,
const base::WeakPtr<syncer::SyncMergeResult>& merge_result) {
syncer::UserShare* user_share = profile_sync_service->GetUserShare();
- return new GenericChangeProcessor(error_handler,
- local_service,
- merge_result,
- user_share);
+ // TODO(maniscalco): Replace FakeAttachmentService with a real
+ // AttachmentService implementation once it has been implemented (bug 356359).
+ scoped_ptr<syncer::AttachmentStore> attachment_store(
+ new syncer::FakeAttachmentStore(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ scoped_ptr<syncer::AttachmentServiceBase> attachment_service(
+ new syncer::FakeAttachmentService(attachment_store.Pass()));
+ return new GenericChangeProcessor(
+ error_handler,
+ local_service,
+ merge_result,
+ user_share,
+ attachment_service.Pass());
}
browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl::

Powered by Google App Engine
This is Rietveld 408576698