| OLD | NEW |
| 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 SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ |
| 6 #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ | 6 #define SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 ObserverList<SyncManager::Observer>* GetObservers(); | 116 ObserverList<SyncManager::Observer>* GetObservers(); |
| 117 | 117 |
| 118 virtual void RegisterDirectoryTypeDebugInfoObserver( | 118 virtual void RegisterDirectoryTypeDebugInfoObserver( |
| 119 syncer::TypeDebugInfoObserver* observer) OVERRIDE; | 119 syncer::TypeDebugInfoObserver* observer) OVERRIDE; |
| 120 virtual void UnregisterDirectoryTypeDebugInfoObserver( | 120 virtual void UnregisterDirectoryTypeDebugInfoObserver( |
| 121 syncer::TypeDebugInfoObserver* observer) OVERRIDE; | 121 syncer::TypeDebugInfoObserver* observer) OVERRIDE; |
| 122 virtual bool HasDirectoryTypeDebugInfoObserver( | 122 virtual bool HasDirectoryTypeDebugInfoObserver( |
| 123 syncer::TypeDebugInfoObserver* observer) OVERRIDE; | 123 syncer::TypeDebugInfoObserver* observer) OVERRIDE; |
| 124 virtual void RequestEmitDebugInfo() OVERRIDE; | 124 virtual void RequestEmitDebugInfo() OVERRIDE; |
| 125 | 125 |
| 126 bool initialized() const { |
| 127 return initialized_; |
| 128 } |
| 129 |
| 126 private: | 130 private: |
| 127 void NotifyInitializationSuccess(); | 131 void NotifyInitializationSuccess(); |
| 128 void NotifyInitializationFailure(); | 132 void NotifyInitializationFailure(); |
| 129 | 133 |
| 130 bool InitBackupDB( | 134 bool InitBackupDB( |
| 131 const base::FilePath& sync_folder, | 135 const base::FilePath& sync_folder, |
| 132 InternalComponentsFactory* internal_components_factory); | 136 InternalComponentsFactory* internal_components_factory); |
| 133 | 137 |
| 134 bool InitTypeRootNode(ModelType type); | 138 bool InitTypeRootNode(ModelType type); |
| 135 void InitBookmarkFolder(const std::string& folder); | 139 void InitBookmarkFolder(const std::string& folder); |
| 136 | 140 |
| 137 UserShare share_; | 141 UserShare share_; |
| 138 ObserverList<SyncManager::Observer> observers_; | 142 ObserverList<SyncManager::Observer> observers_; |
| 139 | 143 |
| 140 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; | 144 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; |
| 141 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; | 145 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; |
| 142 | 146 |
| 143 base::WeakPtrFactory<SyncRollbackManagerBase> weak_ptr_factory_; | 147 base::WeakPtrFactory<SyncRollbackManagerBase> weak_ptr_factory_; |
| 144 | 148 |
| 145 scoped_ptr<SyncEncryptionHandler> dummy_handler_; | 149 scoped_ptr<SyncEncryptionHandler> dummy_handler_; |
| 146 | 150 |
| 151 bool initialized_; |
| 152 |
| 147 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManagerBase); | 153 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManagerBase); |
| 148 }; | 154 }; |
| 149 | 155 |
| 150 } // namespace syncer | 156 } // namespace syncer |
| 151 | 157 |
| 152 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ | 158 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ |
| OLD | NEW |