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

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: Pull in upstream changes. 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 f8374d7eaa572a54a001010c2d5ca861636140b9..bd383f3ea8ba959dc88197974635293d2152810d 100644
--- a/chrome/browser/sync/profile_sync_components_factory_impl.cc
+++ b/chrome/browser/sync/profile_sync_components_factory_impl.cc
@@ -68,6 +68,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_MANAGED_USERS)
@@ -429,10 +432,18 @@ 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();
+ // TODO(maniscalco): Construct a real AttachmentService with a real
+ // AttachmentStore instead of this fake stuff.
+ scoped_ptr<syncer::AttachmentStore> attachment_store(
+ new syncer::FakeAttachmentStore(
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO)));
+ scoped_ptr<syncer::AttachmentService> attachment_service(
+ new syncer::FakeAttachmentService(attachment_store.Pass()));
return new GenericChangeProcessor(error_handler,
local_service,
merge_result,
- user_share);
+ user_share,
+ attachment_service.Pass());
}
browser_sync::SharedChangeProcessor* ProfileSyncComponentsFactoryImpl::

Powered by Google App Engine
This is Rietveld 408576698