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

Side by Side Diff: chrome/browser/sync/profile_sync_components_factory_impl.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 (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"
(...skipping 26 matching lines...) Expand all
37 ProfileSyncComponentsFactoryImpl( 37 ProfileSyncComponentsFactoryImpl(
38 Profile* profile, 38 Profile* profile,
39 base::CommandLine* command_line, 39 base::CommandLine* command_line,
40 const GURL& sync_service_url, 40 const GURL& sync_service_url,
41 OAuth2TokenService* token_service, 41 OAuth2TokenService* token_service,
42 net::URLRequestContextGetter* url_request_context_getter); 42 net::URLRequestContextGetter* url_request_context_getter);
43 virtual ~ProfileSyncComponentsFactoryImpl(); 43 virtual ~ProfileSyncComponentsFactoryImpl();
44 44
45 virtual void RegisterDataTypes(ProfileSyncService* pss) OVERRIDE; 45 virtual void RegisterDataTypes(ProfileSyncService* pss) OVERRIDE;
46 46
47 virtual browser_sync::DataTypeManager* CreateDataTypeManager( 47 virtual sync_driver::DataTypeManager* CreateDataTypeManager(
48 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& 48 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>&
49 debug_info_listener, 49 debug_info_listener,
50 const browser_sync::DataTypeController::TypeMap* controllers, 50 const sync_driver::DataTypeController::TypeMap* controllers,
51 const browser_sync::DataTypeEncryptionHandler* encryption_handler, 51 const sync_driver::DataTypeEncryptionHandler* encryption_handler,
52 browser_sync::SyncBackendHost* backend, 52 browser_sync::SyncBackendHost* backend,
53 browser_sync::DataTypeManagerObserver* observer, 53 sync_driver::DataTypeManagerObserver* observer,
54 browser_sync::FailedDataTypesHandler* failed_data_types_handler) 54 sync_driver::FailedDataTypesHandler* failed_data_types_handler)
55 OVERRIDE; 55 OVERRIDE;
56 56
57 virtual browser_sync::SyncBackendHost* CreateSyncBackendHost( 57 virtual browser_sync::SyncBackendHost* CreateSyncBackendHost(
58 const std::string& name, 58 const std::string& name,
59 Profile* profile, 59 Profile* profile,
60 invalidation::InvalidationService* invalidator, 60 invalidation::InvalidationService* invalidator,
61 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs, 61 const base::WeakPtr<sync_driver::SyncPrefs>& sync_prefs,
62 const base::FilePath& sync_folder) OVERRIDE; 62 const base::FilePath& sync_folder) OVERRIDE;
63 63
64 virtual scoped_ptr<browser_sync::LocalDeviceInfoProvider> 64 virtual scoped_ptr<browser_sync::LocalDeviceInfoProvider>
65 CreateLocalDeviceInfoProvider() OVERRIDE; 65 CreateLocalDeviceInfoProvider() OVERRIDE;
66 66
67 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType( 67 virtual base::WeakPtr<syncer::SyncableService> GetSyncableServiceForType(
68 syncer::ModelType type) OVERRIDE; 68 syncer::ModelType type) OVERRIDE;
69 virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService( 69 virtual scoped_ptr<syncer::AttachmentService> CreateAttachmentService(
70 const syncer::UserShare& user_share, 70 const syncer::UserShare& user_share,
71 syncer::AttachmentService::Delegate* delegate) OVERRIDE; 71 syncer::AttachmentService::Delegate* delegate) OVERRIDE;
72 72
73 // Legacy datatypes that need to be converted to the SyncableService API. 73 // Legacy datatypes that need to be converted to the SyncableService API.
74 virtual SyncComponents CreateBookmarkSyncComponents( 74 virtual SyncComponents CreateBookmarkSyncComponents(
75 ProfileSyncService* profile_sync_service, 75 ProfileSyncService* profile_sync_service,
76 browser_sync::DataTypeErrorHandler* error_handler) OVERRIDE; 76 sync_driver::DataTypeErrorHandler* error_handler) OVERRIDE;
77 virtual SyncComponents CreateTypedUrlSyncComponents( 77 virtual SyncComponents CreateTypedUrlSyncComponents(
78 ProfileSyncService* profile_sync_service, 78 ProfileSyncService* profile_sync_service,
79 history::HistoryBackend* history_backend, 79 history::HistoryBackend* history_backend,
80 browser_sync::DataTypeErrorHandler* error_handler) OVERRIDE; 80 sync_driver::DataTypeErrorHandler* error_handler) OVERRIDE;
81 81
82 private: 82 private:
83 // Register data types which are enabled on desktop platforms only. 83 // Register data types which are enabled on desktop platforms only.
84 // |disabled_types| and |enabled_types| correspond only to those types 84 // |disabled_types| and |enabled_types| correspond only to those types
85 // being explicitly enabled/disabled by the command line. 85 // being explicitly enabled/disabled by the command line.
86 void RegisterDesktopDataTypes(syncer::ModelTypeSet disabled_types, 86 void RegisterDesktopDataTypes(syncer::ModelTypeSet disabled_types,
87 syncer::ModelTypeSet enabled_types, 87 syncer::ModelTypeSet enabled_types,
88 ProfileSyncService* pss); 88 ProfileSyncService* pss);
89 // Register data types which are enabled on both desktop and mobile. 89 // Register data types which are enabled on both desktop and mobile.
90 // |disabled_types| and |enabled_types| correspond only to those types 90 // |disabled_types| and |enabled_types| correspond only to those types
91 // being explicitly enabled/disabled by the command line. 91 // being explicitly enabled/disabled by the command line.
92 void RegisterCommonDataTypes(syncer::ModelTypeSet disabled_types, 92 void RegisterCommonDataTypes(syncer::ModelTypeSet disabled_types,
93 syncer::ModelTypeSet enabled_types, 93 syncer::ModelTypeSet enabled_types,
94 ProfileSyncService* pss); 94 ProfileSyncService* pss);
95 // Used to bind a callback to give to DataTypeControllers to disable 95 // Used to bind a callback to give to DataTypeControllers to disable
96 // data types. 96 // data types.
97 browser_sync::DataTypeController::DisableTypeCallback 97 sync_driver::DataTypeController::DisableTypeCallback
98 MakeDisableCallbackFor(syncer::ModelType type); 98 MakeDisableCallbackFor(syncer::ModelType type);
99 void DisableBrokenType(syncer::ModelType type, 99 void DisableBrokenType(syncer::ModelType type,
100 const tracked_objects::Location& from_here, 100 const tracked_objects::Location& from_here,
101 const std::string& message); 101 const std::string& message);
102 102
103 Profile* profile_; 103 Profile* profile_;
104 base::CommandLine* command_line_; 104 base::CommandLine* command_line_;
105 // Set on the UI thread (since extensions::ExtensionSystemFactory is 105 // Set on the UI thread (since extensions::ExtensionSystemFactory is
106 // non-threadsafe); accessed on both the UI and FILE threads in 106 // non-threadsafe); accessed on both the UI and FILE threads in
107 // GetSyncableServiceForType. 107 // GetSyncableServiceForType.
108 extensions::ExtensionSystem* extension_system_; 108 extensions::ExtensionSystem* extension_system_;
109 scoped_refptr<autofill::AutofillWebDataService> web_data_service_; 109 scoped_refptr<autofill::AutofillWebDataService> web_data_service_;
110 110
111 const GURL sync_service_url_; 111 const GURL sync_service_url_;
112 OAuth2TokenService* const token_service_; 112 OAuth2TokenService* const token_service_;
113 net::URLRequestContextGetter* const url_request_context_getter_; 113 net::URLRequestContextGetter* const url_request_context_getter_;
114 114
115 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_; 115 base::WeakPtrFactory<ProfileSyncComponentsFactoryImpl> weak_factory_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl); 117 DISALLOW_COPY_AND_ASSIGN(ProfileSyncComponentsFactoryImpl);
118 }; 118 };
119 119
120 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__ 120 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_COMPONENTS_FACTORY_IMPL_H__
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_components_factory.h ('k') | chrome/browser/sync/profile_sync_components_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698