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

Unified Diff: chrome/browser/sync/glue/shared_change_processor.cc

Issue 263903004: Add AttachmentUploader interface and fake implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 7 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 | components/sync_driver/generic_change_processor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/shared_change_processor.cc
diff --git a/chrome/browser/sync/glue/shared_change_processor.cc b/chrome/browser/sync/glue/shared_change_processor.cc
index 095e50e93dfb105c39e465d8dc9af86aa7d3c0c6..b89635f4f203085af70a5284ee274aad07866d0c 100644
--- a/chrome/browser/sync/glue/shared_change_processor.cc
+++ b/chrome/browser/sync/glue/shared_change_processor.cc
@@ -11,6 +11,7 @@
#include "components/sync_driver/sync_api_component_factory.h"
#include "sync/api/attachments/attachment_service.h"
#include "sync/api/attachments/fake_attachment_service.h"
+#include "sync/api/attachments/fake_attachment_uploader.h"
#include "sync/api/sync_change.h"
using base::AutoLock;
@@ -72,11 +73,17 @@ base::WeakPtr<syncer::SyncableService> SharedChangeProcessor::Connect(
return base::WeakPtr<syncer::SyncableService>();
}
+ // TODO(maniscalco): Use a shared (one per profile) thread-safe instance of
+ // AttachmentUpload instead of creating a new one per AttachmentService (bug
+ // 369536).
+ scoped_ptr<syncer::AttachmentUploader> attachment_uploader(
+ new syncer::FakeAttachmentUploader);
// TODO(maniscalco): Replace FakeAttachmentService with a real
// AttachmentService implementation once implemented (bug 356359).
scoped_ptr<syncer::AttachmentService> attachment_service(
new syncer::FakeAttachmentService(
- sync_factory->CreateCustomAttachmentStoreForType(type)));
+ sync_factory->CreateCustomAttachmentStoreForType(type),
+ attachment_uploader.Pass()));
generic_change_processor_ = processor_factory->CreateGenericChangeProcessor(
sync_service_->GetUserShare(),
« no previous file with comments | « no previous file | components/sync_driver/generic_change_processor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698