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

Unified Diff: components/sync_driver/generic_change_processor.cc

Issue 996473005: Revert of [Sync] Refactor AttachmentStore classes. Introduce concept of referrer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: components/sync_driver/generic_change_processor.cc
diff --git a/components/sync_driver/generic_change_processor.cc b/components/sync_driver/generic_change_processor.cc
index 8f3eff195ecc74aa57e401bd7be78ec8af7c36ec..60d9977b4dbdc060eb75e48c038c9745b04798e1 100644
--- a/components/sync_driver/generic_change_processor.cc
+++ b/components/sync_driver/generic_change_processor.cc
@@ -94,7 +94,7 @@
const base::WeakPtr<syncer::SyncMergeResult>& merge_result,
syncer::UserShare* user_share,
SyncApiComponentFactory* sync_factory,
- scoped_ptr<syncer::AttachmentStore> attachment_store)
+ const scoped_refptr<syncer::AttachmentStore>& attachment_store)
: ChangeProcessor(error_handler),
type_(type),
local_service_(local_service),
@@ -103,14 +103,14 @@
weak_ptr_factory_(this) {
DCHECK(CalledOnValidThread());
DCHECK_NE(type_, syncer::UNSPECIFIED);
- if (attachment_store) {
+ if (attachment_store.get()) {
std::string store_birthday;
{
syncer::ReadTransaction trans(FROM_HERE, share_handle());
store_birthday = trans.GetStoreBirthday();
}
attachment_service_ = sync_factory->CreateAttachmentService(
- attachment_store.Pass(), *user_share, store_birthday, type, this);
+ attachment_store, *user_share, store_birthday, type, this);
attachment_service_weak_ptr_factory_.reset(
new base::WeakPtrFactory<syncer::AttachmentService>(
attachment_service_.get()));
« no previous file with comments | « components/sync_driver/generic_change_processor.h ('k') | components/sync_driver/generic_change_processor_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698