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

Unified Diff: chrome/browser/sync/glue/generic_change_processor.h

Issue 187303006: Update sync API to support attachments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@attachmentapi
Patch Set: Rename GetAttachments to GetLocalAttachmentsForUpload. 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/glue/generic_change_processor.h
diff --git a/chrome/browser/sync/glue/generic_change_processor.h b/chrome/browser/sync/glue/generic_change_processor.h
index 0f0c93bc899a3a7bb0fd6423c419f0dec5750647..3e7471e30c5d090b9b1d76819756633a12b5e9b0 100644
--- a/chrome/browser/sync/glue/generic_change_processor.h
+++ b/chrome/browser/sync/glue/generic_change_processor.h
@@ -13,6 +13,8 @@
#include "chrome/browser/sync/glue/change_processor.h"
#include "components/sync_driver/data_type_controller.h"
#include "components/sync_driver/data_type_error_handler.h"
+#include "sync/api/attachments/attachment_service.h"
+#include "sync/api/attachments/attachment_service_proxy.h"
#include "sync/api/sync_change_processor.h"
#include "sync/api/sync_merge_result.h"
@@ -46,7 +48,8 @@ class GenericChangeProcessor : public ChangeProcessor,
DataTypeErrorHandler* error_handler,
const base::WeakPtr<syncer::SyncableService>& local_service,
const base::WeakPtr<syncer::SyncMergeResult>& merge_result,
- syncer::UserShare* user_share);
+ syncer::UserShare* user_share,
+ scoped_ptr<syncer::AttachmentService> attachment_service);
virtual ~GenericChangeProcessor();
// ChangeProcessor interface.
@@ -126,6 +129,13 @@ class GenericChangeProcessor : public ChangeProcessor,
// and have to keep a local pointer to the user_share.
syncer::UserShare* const share_handle_;
+ scoped_ptr<syncer::AttachmentService> attachment_service_;
+ // Must be destroyed before attachment_service_ to ensure WeakPtrs are
+ // invalidated before attachment_service_ is destroyed.
+ base::WeakPtrFactory<syncer::AttachmentService>
+ attachment_service_weak_ptr_factory_;
+ syncer::AttachmentServiceProxy attachment_service_proxy_;
+
DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessor);
};
« no previous file with comments | « chrome/browser/sync/glue/fake_generic_change_processor.cc ('k') | chrome/browser/sync/glue/generic_change_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698