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 #include "sync/internal_api/sync_backup_manager.h" | 5 #include "sync/internal_api/sync_backup_manager.h" |
6 | 6 |
7 #include "sync/internal_api/public/read_node.h" | 7 #include "sync/internal_api/public/read_node.h" |
8 #include "sync/internal_api/public/write_transaction.h" | 8 #include "sync/internal_api/public/write_transaction.h" |
9 #include "sync/syncable/directory.h" | 9 #include "sync/syncable/directory.h" |
10 #include "sync/syncable/mutable_entry.h" | 10 #include "sync/syncable/mutable_entry.h" |
| 11 #include "url/gurl.h" |
11 | 12 |
12 namespace syncer { | 13 namespace syncer { |
13 | 14 |
14 SyncBackupManager::SyncBackupManager() | 15 SyncBackupManager::SyncBackupManager() |
15 : in_normalization_(false) { | 16 : in_normalization_(false) { |
16 } | 17 } |
17 | 18 |
18 SyncBackupManager::~SyncBackupManager() { | 19 SyncBackupManager::~SyncBackupManager() { |
19 } | 20 } |
20 | 21 |
21 void SyncBackupManager::Init( | 22 void SyncBackupManager::Init( |
22 const base::FilePath& database_location, | 23 const base::FilePath& database_location, |
23 const WeakHandle<JsEventHandler>& event_handler, | 24 const WeakHandle<JsEventHandler>& event_handler, |
24 const std::string& sync_server_and_path, | 25 const GURL& service_url, |
25 int sync_server_port, | 26 scoped_ptr<HttpPostProviderFactory> post_factory, |
26 bool use_ssl, | 27 const std::vector<scoped_refptr<ModelSafeWorker> >& workers, |
27 scoped_ptr<HttpPostProviderFactory> post_factory, | 28 ExtensionsActivity* extensions_activity, |
28 const std::vector<scoped_refptr<ModelSafeWorker> >& workers, | 29 SyncManager::ChangeDelegate* change_delegate, |
29 ExtensionsActivity* extensions_activity, | 30 const SyncCredentials& credentials, |
30 SyncManager::ChangeDelegate* change_delegate, | 31 const std::string& invalidator_client_id, |
31 const SyncCredentials& credentials, | 32 const std::string& restored_key_for_bootstrapping, |
32 const std::string& invalidator_client_id, | 33 const std::string& restored_keystore_key_for_bootstrapping, |
33 const std::string& restored_key_for_bootstrapping, | 34 InternalComponentsFactory* internal_components_factory, |
34 const std::string& restored_keystore_key_for_bootstrapping, | 35 Encryptor* encryptor, |
35 InternalComponentsFactory* internal_components_factory, | 36 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, |
36 Encryptor* encryptor, | 37 ReportUnrecoverableErrorFunction report_unrecoverable_error_function, |
37 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, | 38 CancelationSignal* cancelation_signal) { |
38 ReportUnrecoverableErrorFunction | |
39 report_unrecoverable_error_function, | |
40 CancelationSignal* cancelation_signal) { | |
41 if (SyncRollbackManagerBase::InitInternal( | 39 if (SyncRollbackManagerBase::InitInternal( |
42 database_location, | 40 database_location, |
43 internal_components_factory, | 41 internal_components_factory, |
44 unrecoverable_error_handler.Pass(), | 42 unrecoverable_error_handler.Pass(), |
45 report_unrecoverable_error_function)) { | 43 report_unrecoverable_error_function)) { |
46 GetUserShare()->directory->CollectMetaHandleCounts( | 44 GetUserShare()->directory->CollectMetaHandleCounts( |
47 &status_.num_entries_by_type, &status_.num_to_delete_entries_by_type); | 45 &status_.num_entries_by_type, &status_.num_to_delete_entries_by_type); |
48 | 46 |
49 HideSyncPreference(PRIORITY_PREFERENCES); | 47 HideSyncPreference(PRIORITY_PREFERENCES); |
50 HideSyncPreference(PREFERENCES); | 48 HideSyncPreference(PREFERENCES); |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 143 |
146 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( | 144 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( |
147 syncer::TypeDebugInfoObserver* observer) {} | 145 syncer::TypeDebugInfoObserver* observer) {} |
148 | 146 |
149 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( | 147 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( |
150 syncer::TypeDebugInfoObserver* observer) { return false; } | 148 syncer::TypeDebugInfoObserver* observer) { return false; } |
151 | 149 |
152 void SyncBackupManager::RequestEmitDebugInfo() {} | 150 void SyncBackupManager::RequestEmitDebugInfo() {} |
153 | 151 |
154 } // namespace syncer | 152 } // namespace syncer |
OLD | NEW |