1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_IMPL_H__ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_IMPL_H__ 7 #pragma once 8 9 #include <string> 10 11 #include "base/basictypes.h" 12 #include "chrome/browser/sync/profile_sync_factory.h" 13 14 class CommandLine; 15 class Profile; 16 17 class ProfileSyncFactoryImpl : public ProfileSyncFactory { 18 public: 19 ProfileSyncFactoryImpl(Profile* profile, CommandLine* command_line); ~ProfileSyncFactoryImpl()20 virtual ~ProfileSyncFactoryImpl() {} 21 22 // ProfileSyncFactory interface. 23 virtual ProfileSyncService* CreateProfileSyncService( 24 const std::string& cros_user); 25 26 virtual browser_sync::DataTypeManager* CreateDataTypeManager( 27 browser_sync::SyncBackendHost* backend, 28 const browser_sync::DataTypeController::TypeMap& controllers); 29 30 virtual SyncComponents CreateAppSyncComponents( 31 ProfileSyncService* profile_sync_service, 32 browser_sync::UnrecoverableErrorHandler* error_handler); 33 34 virtual SyncComponents CreateAutofillSyncComponents( 35 ProfileSyncService* profile_sync_service, 36 WebDatabase* web_database, 37 PersonalDataManager* personal_data, 38 browser_sync::UnrecoverableErrorHandler* error_handler); 39 40 virtual SyncComponents CreateAutofillProfileSyncComponents( 41 ProfileSyncService* profile_sync_service, 42 WebDatabase* web_database, 43 PersonalDataManager* personal_data, 44 browser_sync::UnrecoverableErrorHandler* error_handler); 45 46 virtual SyncComponents CreateBookmarkSyncComponents( 47 ProfileSyncService* profile_sync_service, 48 browser_sync::UnrecoverableErrorHandler* error_handler); 49 50 virtual SyncComponents CreateExtensionSyncComponents( 51 ProfileSyncService* profile_sync_service, 52 browser_sync::UnrecoverableErrorHandler* error_handler); 53 54 virtual SyncComponents CreatePasswordSyncComponents( 55 ProfileSyncService* profile_sync_service, 56 PasswordStore* password_store, 57 browser_sync::UnrecoverableErrorHandler* error_handler); 58 59 virtual SyncComponents CreatePreferenceSyncComponents( 60 ProfileSyncService* profile_sync_service, 61 browser_sync::UnrecoverableErrorHandler* error_handler); 62 63 virtual SyncComponents CreateThemeSyncComponents( 64 ProfileSyncService* profile_sync_service, 65 browser_sync::UnrecoverableErrorHandler* error_handler); 66 67 virtual SyncComponents CreateTypedUrlSyncComponents( 68 ProfileSyncService* profile_sync_service, 69 history::HistoryBackend* history_backend, 70 browser_sync::UnrecoverableErrorHandler* error_handler); 71 72 virtual SyncComponents CreateSessionSyncComponents( 73 ProfileSyncService* profile_sync_service, 74 browser_sync::UnrecoverableErrorHandler* error_handler); 75 76 private: 77 Profile* profile_; 78 CommandLine* command_line_; 79 80 DISALLOW_COPY_AND_ASSIGN(ProfileSyncFactoryImpl); 81 }; 82 83 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_FACTORY_IMPL_H__ 84