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

Side by Side Diff: components/sync_driver/generic_change_processor_factory.cc

Issue 548373003: Move AttachmentStore ownership to datatype (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create AttachmentService in GenericChangeProcessor if AttachmentStore is NULL Created 6 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync_driver/generic_change_processor_factory.h" 5 #include "components/sync_driver/generic_change_processor_factory.h"
6 6
7 #include "components/sync_driver/generic_change_processor.h" 7 #include "components/sync_driver/generic_change_processor.h"
8 #include "sync/api/syncable_service.h"
8 9
9 namespace sync_driver { 10 namespace sync_driver {
10 11
11 12
12 GenericChangeProcessorFactory::GenericChangeProcessorFactory() {} 13 GenericChangeProcessorFactory::GenericChangeProcessorFactory() {}
13 14
14 GenericChangeProcessorFactory::~GenericChangeProcessorFactory() {} 15 GenericChangeProcessorFactory::~GenericChangeProcessorFactory() {}
15 16
16 scoped_ptr<GenericChangeProcessor> 17 scoped_ptr<GenericChangeProcessor>
17 GenericChangeProcessorFactory::CreateGenericChangeProcessor( 18 GenericChangeProcessorFactory::CreateGenericChangeProcessor(
18 syncer::UserShare* user_share, 19 syncer::UserShare* user_share,
19 DataTypeErrorHandler* error_handler, 20 DataTypeErrorHandler* error_handler,
20 const base::WeakPtr<syncer::SyncableService>& local_service, 21 const base::WeakPtr<syncer::SyncableService>& local_service,
21 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, 22 const base::WeakPtr<syncer::SyncMergeResult>& merge_result,
22 SyncApiComponentFactory* sync_factory) { 23 SyncApiComponentFactory* sync_factory) {
23 DCHECK(user_share); 24 DCHECK(user_share);
24 return make_scoped_ptr(new GenericChangeProcessor(error_handler, 25 return make_scoped_ptr(new GenericChangeProcessor(
25 local_service, 26 error_handler,
26 merge_result, 27 local_service,
27 user_share, 28 merge_result,
28 sync_factory)).Pass(); 29 user_share,
30 sync_factory,
31 local_service->GetAttachmentStore())).Pass();
29 } 32 }
30 33
31 } // namespace sync_driver 34 } // namespace sync_driver
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698