diff options
author | pavely <pavely@chromium.org> | 2015-03-09 14:13:59 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-03-09 21:15:15 +0000 |
commit | 6adcada8a799057c31c0f17550c9e2747a8df847 (patch) | |
tree | 1245ad7a94e04755c75d9f6606316b324485b8bf /components/sync_driver/generic_change_processor.cc | |
parent | 28acf2a2b90abf3cafb21e44a6c396f747e8653d (diff) | |
download | chromium_src-6adcada8a799057c31c0f17550c9e2747a8df847.zip chromium_src-6adcada8a799057c31c0f17550c9e2747a8df847.tar.gz chromium_src-6adcada8a799057c31c0f17550c9e2747a8df847.tar.bz2 |
[Sync] Refactor AttachmentStore classes. Introduce concept of referrer.
In this change:
- Move towards following class hierarchy: http://www.plantuml.com:80/plantuml/png/ZPBTJiCm38NlynIvv4TzWsaI525nCI5jkw-on1EZQHmvwQG9U7TC4-ZeKiITvNm-EiSExbv1Hxc6VOszYs24mDHQeG6xFNcGRqBAknYLVkd0nKr40l7nmqrU1deDeRUHYrfPkrEw3LmJx848YCkWqODfkECZBIOAZuHin9abWxUo9b0Hdjt38RGJyEhwZ4YZI9kJq_mmRp0pAPKnd7pGgG8t6usTHyVe7_FPtY3mbOth9ghGDjGxTnwlaEq-ySjv-KmCwZflxvVyE5bSIa4Mw7ZGyDHvAyHurPkgkhZgz9PuoNp75tDhAUZcJ68cwkATHyfXnFWn4_PFDsKuNLuKLrFodGS-0G00
- Remove AttachmenService::GetStore. Now attachment store is owned by
model type, there is no need to get it from AttachmentService
- Introduce AttachmentReferrer. There is no functionality behind it yet
and interface is not complete for it. These will come in the next change.
BUG=457735
R=maniscalco@chromium.org
TEST=Not exposed in chrome. Only unit tests available (sync_unit_tests)
Review URL: https://codereview.chromium.org/986743004
Cr-Commit-Position: refs/heads/master@{#319733}
Diffstat (limited to 'components/sync_driver/generic_change_processor.cc')
-rw-r--r-- | components/sync_driver/generic_change_processor.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/sync_driver/generic_change_processor.cc b/components/sync_driver/generic_change_processor.cc index 60d9977..8f3eff1 100644 --- a/components/sync_driver/generic_change_processor.cc +++ b/components/sync_driver/generic_change_processor.cc @@ -94,7 +94,7 @@ GenericChangeProcessor::GenericChangeProcessor( const base::WeakPtr<syncer::SyncMergeResult>& merge_result, syncer::UserShare* user_share, SyncApiComponentFactory* sync_factory, - const scoped_refptr<syncer::AttachmentStore>& attachment_store) + scoped_ptr<syncer::AttachmentStore> attachment_store) : ChangeProcessor(error_handler), type_(type), local_service_(local_service), @@ -103,14 +103,14 @@ GenericChangeProcessor::GenericChangeProcessor( weak_ptr_factory_(this) { DCHECK(CalledOnValidThread()); DCHECK_NE(type_, syncer::UNSPECIFIED); - if (attachment_store.get()) { + if (attachment_store) { std::string store_birthday; { syncer::ReadTransaction trans(FROM_HERE, share_handle()); store_birthday = trans.GetStoreBirthday(); } attachment_service_ = sync_factory->CreateAttachmentService( - attachment_store, *user_share, store_birthday, type, this); + attachment_store.Pass(), *user_share, store_birthday, type, this); attachment_service_weak_ptr_factory_.reset( new base::WeakPtrFactory<syncer::AttachmentService>( attachment_service_.get())); |