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

Side by Side Diff: sync/internal_api/sync_rollback_manager_base.h

Issue 1275743002: [Sync] Remove backend unrecoverable error handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix leak Created 5 years, 4 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
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 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 ModelTypeSet models_with_changes) override; 93 ModelTypeSet models_with_changes) override;
94 94
95 protected: 95 protected:
96 base::ObserverList<SyncManager::Observer>* GetObservers(); 96 base::ObserverList<SyncManager::Observer>* GetObservers();
97 97
98 // Initialize sync backup DB. 98 // Initialize sync backup DB.
99 bool InitInternal( 99 bool InitInternal(
100 const base::FilePath& database_location, 100 const base::FilePath& database_location,
101 InternalComponentsFactory* internal_components_factory, 101 InternalComponentsFactory* internal_components_factory,
102 InternalComponentsFactory::StorageOption storage, 102 InternalComponentsFactory::StorageOption storage,
103 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, 103 const WeakHandle<UnrecoverableErrorHandler>& unrecoverable_error_handler,
104 const base::Closure& report_unrecoverable_error_function); 104 const base::Closure& report_unrecoverable_error_function);
105 105
106 void RegisterDirectoryTypeDebugInfoObserver( 106 void RegisterDirectoryTypeDebugInfoObserver(
107 syncer::TypeDebugInfoObserver* observer) override; 107 syncer::TypeDebugInfoObserver* observer) override;
108 void UnregisterDirectoryTypeDebugInfoObserver( 108 void UnregisterDirectoryTypeDebugInfoObserver(
109 syncer::TypeDebugInfoObserver* observer) override; 109 syncer::TypeDebugInfoObserver* observer) override;
110 bool HasDirectoryTypeDebugInfoObserver( 110 bool HasDirectoryTypeDebugInfoObserver(
111 syncer::TypeDebugInfoObserver* observer) override; 111 syncer::TypeDebugInfoObserver* observer) override;
112 void RequestEmitDebugInfo() override; 112 void RequestEmitDebugInfo() override;
113 113
114 bool initialized() const { 114 bool initialized() const {
115 return initialized_; 115 return initialized_;
116 } 116 }
117 117
118 private: 118 private:
119 void NotifyInitializationSuccess(); 119 void NotifyInitializationSuccess();
120 void NotifyInitializationFailure(); 120 void NotifyInitializationFailure();
121 121
122 bool InitBackupDB(const base::FilePath& sync_folder, 122 bool InitBackupDB(const base::FilePath& sync_folder,
123 InternalComponentsFactory* internal_components_factory, 123 InternalComponentsFactory* internal_components_factory,
124 InternalComponentsFactory::StorageOption storage); 124 InternalComponentsFactory::StorageOption storage);
125 125
126 bool InitTypeRootNode(ModelType type); 126 bool InitTypeRootNode(ModelType type);
127 void InitBookmarkFolder(const std::string& folder); 127 void InitBookmarkFolder(const std::string& folder);
128 128
129 UserShare share_; 129 UserShare share_;
130 base::ObserverList<SyncManager::Observer> observers_; 130 base::ObserverList<SyncManager::Observer> observers_;
131 131
132 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; 132 WeakHandle<UnrecoverableErrorHandler> unrecoverable_error_handler_;
133 base::Closure report_unrecoverable_error_function_; 133 base::Closure report_unrecoverable_error_function_;
134 134
135 scoped_ptr<SyncEncryptionHandler> dummy_handler_; 135 scoped_ptr<SyncEncryptionHandler> dummy_handler_;
136 136
137 bool initialized_; 137 bool initialized_;
138 138
139 base::WeakPtrFactory<SyncRollbackManagerBase> weak_ptr_factory_; 139 base::WeakPtrFactory<SyncRollbackManagerBase> weak_ptr_factory_;
140 140
141 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManagerBase); 141 DISALLOW_COPY_AND_ASSIGN(SyncRollbackManagerBase);
142 }; 142 };
143 143
144 } // namespace syncer 144 } // namespace syncer
145 145
146 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_ 146 #endif // SYNC_INTERNAL_API_SYNC_ROLLBACK_MANAGER_BASE_H_
OLDNEW
« no previous file with comments | « sync/internal_api/sync_rollback_manager.cc ('k') | sync/internal_api/sync_rollback_manager_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698