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

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

Issue 408003002: [Sync] Fix namespace for sync_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 5 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 | Annotate | Revision Log
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 #ifndef COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_ 5 #ifndef COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_
6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_ 6 #define COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 9
10 namespace syncer { 10 namespace syncer {
11 class AttachmentService; 11 class AttachmentService;
12 class SyncableService; 12 class SyncableService;
13 class SyncMergeResult; 13 class SyncMergeResult;
14 struct UserShare; 14 struct UserShare;
15 } 15 }
16 16
17 namespace browser_sync { 17 namespace sync_driver {
18 18
19 class DataTypeErrorHandler; 19 class DataTypeErrorHandler;
20 class GenericChangeProcessor; 20 class GenericChangeProcessor;
21 class SyncApiComponentFactory; 21 class SyncApiComponentFactory;
22 22
23 // Because GenericChangeProcessors are created and used only from the model 23 // Because GenericChangeProcessors are created and used only from the model
24 // thread, their lifetime is strictly shorter than other components like 24 // thread, their lifetime is strictly shorter than other components like
25 // DataTypeController, which live before / after communication with model 25 // DataTypeController, which live before / after communication with model
26 // threads begins and ends. 26 // threads begins and ends.
27 // The GCP is created "on the fly" at just the right time, on just the right 27 // The GCP is created "on the fly" at just the right time, on just the right
28 // thread. Given that, we use a factory to instantiate GenericChangeProcessors 28 // thread. Given that, we use a factory to instantiate GenericChangeProcessors
29 // so that tests can choose to use a fake processor (i.e instead of injection). 29 // so that tests can choose to use a fake processor (i.e instead of injection).
30 // |sync_factory| is used to create AttachmentServicefor GenericChangeProcessor. 30 // |sync_factory| is used to create AttachmentServicefor GenericChangeProcessor.
31 // It is not retained after CreateGenericChangeProcessor exits. 31 // It is not retained after CreateGenericChangeProcessor exits.
32 class GenericChangeProcessorFactory { 32 class GenericChangeProcessorFactory {
33 public: 33 public:
34 GenericChangeProcessorFactory(); 34 GenericChangeProcessorFactory();
35 virtual ~GenericChangeProcessorFactory(); 35 virtual ~GenericChangeProcessorFactory();
36 virtual scoped_ptr<GenericChangeProcessor> CreateGenericChangeProcessor( 36 virtual scoped_ptr<GenericChangeProcessor> CreateGenericChangeProcessor(
37 syncer::UserShare* user_share, 37 syncer::UserShare* user_share,
38 browser_sync::DataTypeErrorHandler* error_handler, 38 DataTypeErrorHandler* error_handler,
39 const base::WeakPtr<syncer::SyncableService>& local_service, 39 const base::WeakPtr<syncer::SyncableService>& local_service,
40 const base::WeakPtr<syncer::SyncMergeResult>& merge_result, 40 const base::WeakPtr<syncer::SyncMergeResult>& merge_result,
41 SyncApiComponentFactory* sync_factory); 41 SyncApiComponentFactory* sync_factory);
42 42
43 private: 43 private:
44 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessorFactory); 44 DISALLOW_COPY_AND_ASSIGN(GenericChangeProcessorFactory);
45 }; 45 };
46 46
47 } // namespace browser_sync 47 } // namespace sync_driver
48 48
49 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_ 49 #endif // COMPONENTS_SYNC_DRIVER_GENERIC_CHANGE_PROCESSOR_FACTORY_H_
OLDNEW
« no previous file with comments | « components/sync_driver/generic_change_processor.cc ('k') | components/sync_driver/generic_change_processor_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698