OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/browser/sync/profile_sync_components_factory.h" | 12 #include "chrome/browser/sync/profile_sync_components_factory.h" |
13 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 13 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
14 | 14 |
| 15 class Profile; |
15 | 16 |
| 17 namespace base { |
16 class CommandLine; | 18 class CommandLine; |
17 class Profile; | 19 } |
18 | 20 |
19 namespace extensions { | 21 namespace extensions { |
20 class ExtensionSystem; | 22 class ExtensionSystem; |
21 } | 23 } |
22 | 24 |
23 class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory { | 25 class ProfileSyncComponentsFactoryImpl : public ProfileSyncComponentsFactory { |
24 public: | 26 public: |
25 ProfileSyncComponentsFactoryImpl(Profile* profile, | 27 ProfileSyncComponentsFactoryImpl(Profile* profile, |
26 CommandLine* command_line); | 28 base::CommandLine* command_line); |
27 virtual ~ProfileSyncComponentsFactoryImpl(); | 29 virtual ~ProfileSyncComponentsFactoryImpl(); |
28 | 30 |
29 virtual void RegisterDataTypes(ProfileSyncService* pss) OVERRIDE; | 31 virtual void RegisterDataTypes(ProfileSyncService* pss) OVERRIDE; |
30 | 32 |
31 virtual browser_sync::DataTypeManager* CreateDataTypeManager( | 33 virtual browser_sync::DataTypeManager* CreateDataTypeManager( |
32 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 34 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
33 debug_info_listener, | 35 debug_info_listener, |
34 const browser_sync::DataTypeController::TypeMap* controllers, | 36 const browser_sync::DataTypeController::TypeMap* controllers, |
35 const browser_sync::DataTypeEncryptionHandler* encryption_handler, | 37 const browser_sync::DataTypeEncryptionHandler* encryption_handler, |
36 browser_sync::SyncBackendHost* backend, | 38 browser_sync::SyncBackendHost* backend, |
(...skipping 30 matching lines...) Expand all Loading... |
67 ProfileSyncService* profile_sync_service, | 69 ProfileSyncService* profile_sync_service, |
68 browser_sync::DataTypeErrorHandler* error_handler) OVERRIDE; | 70 browser_sync::DataTypeErrorHandler* error_handler) OVERRIDE; |
69 | 71 |
70 private: | 72 private: |
71 // Register data types which are enabled on desktop platforms only. | 73 // Register data types which are enabled on desktop platforms only. |
72 void RegisterDesktopDataTypes(ProfileSyncService* pss); | 74 void RegisterDesktopDataTypes(ProfileSyncService* pss); |
73 // Register data types which are enabled on both desktop and mobile. | 75 // Register data types which are enabled on both desktop and mobile. |
74 void RegisterCommonDataTypes(ProfileSyncService* pss); | 76 void RegisterCommonDataTypes(ProfileSyncService* pss); |
75 | 77 |
76 Profile* profile_; | 78 Profile* profile_; |
77 CommandLine* command_line_; | 79 base::CommandLine* command_line_; |
78 // Set on the UI thread (since extensions::ExtensionSystemFactory is | 80 // Set on the UI thread (since extensions::ExtensionSystemFactory is |
79 // non-threadsafe); accessed on both the UI and FILE threads in | 81 // non-threadsafe); accessed on both the UI and FILE threads in |
80 // GetSyncableServiceForType. | 82 // GetSyncableServiceForType. |
81 extensions::ExtensionSystem* extension_system_; | 83 extensions::ExtensionSystem* extension_system_; |
82 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; | 84 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); | 86 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); |
85 }; | 87 }; |
86 | 88 |
87 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ | 89 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ |
OLD | NEW |