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 #include "url/gurl.h" |
12 | 12 |
13 namespace syncer { | 13 namespace syncer { |
14 | 14 |
15 SyncBackupManager::SyncBackupManager() | 15 SyncBackupManager::SyncBackupManager() |
16 : in_normalization_(false) { | 16 : in_normalization_(false) { |
17 } | 17 } |
18 | 18 |
19 SyncBackupManager::~SyncBackupManager() { | 19 SyncBackupManager::~SyncBackupManager() { |
20 } | 20 } |
21 | 21 |
22 void SyncBackupManager::Init( | 22 void SyncBackupManager::Init(InitArgs* args) { |
23 const base::FilePath& database_location, | |
24 const WeakHandle<JsEventHandler>& event_handler, | |
25 const GURL& service_url, | |
26 scoped_ptr<HttpPostProviderFactory> post_factory, | |
27 const std::vector<scoped_refptr<ModelSafeWorker> >& workers, | |
28 ExtensionsActivity* extensions_activity, | |
29 SyncManager::ChangeDelegate* change_delegate, | |
30 const SyncCredentials& credentials, | |
31 const std::string& invalidator_client_id, | |
32 const std::string& restored_key_for_bootstrapping, | |
33 const std::string& restored_keystore_key_for_bootstrapping, | |
34 InternalComponentsFactory* internal_components_factory, | |
35 Encryptor* encryptor, | |
36 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler, | |
37 ReportUnrecoverableErrorFunction report_unrecoverable_error_function, | |
38 CancelationSignal* cancelation_signal) { | |
39 if (SyncRollbackManagerBase::InitInternal( | 23 if (SyncRollbackManagerBase::InitInternal( |
40 database_location, | 24 args->database_location, |
41 internal_components_factory, | 25 args->internal_components_factory.get(), |
42 unrecoverable_error_handler.Pass(), | 26 args->unrecoverable_error_handler.Pass(), |
43 report_unrecoverable_error_function)) { | 27 args->report_unrecoverable_error_function)) { |
44 GetUserShare()->directory->CollectMetaHandleCounts( | 28 GetUserShare()->directory->CollectMetaHandleCounts( |
45 &status_.num_entries_by_type, &status_.num_to_delete_entries_by_type); | 29 &status_.num_entries_by_type, &status_.num_to_delete_entries_by_type); |
46 | 30 |
47 HideSyncPreference(PRIORITY_PREFERENCES); | 31 HideSyncPreference(PRIORITY_PREFERENCES); |
48 HideSyncPreference(PREFERENCES); | 32 HideSyncPreference(PREFERENCES); |
49 } | 33 } |
50 } | 34 } |
51 | 35 |
52 void SyncBackupManager::SaveChanges() { | 36 void SyncBackupManager::SaveChanges() { |
53 if (initialized()) { | 37 if (initialized()) { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 127 |
144 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( | 128 void SyncBackupManager::UnregisterDirectoryTypeDebugInfoObserver( |
145 syncer::TypeDebugInfoObserver* observer) {} | 129 syncer::TypeDebugInfoObserver* observer) {} |
146 | 130 |
147 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( | 131 bool SyncBackupManager::HasDirectoryTypeDebugInfoObserver( |
148 syncer::TypeDebugInfoObserver* observer) { return false; } | 132 syncer::TypeDebugInfoObserver* observer) { return false; } |
149 | 133 |
150 void SyncBackupManager::RequestEmitDebugInfo() {} | 134 void SyncBackupManager::RequestEmitDebugInfo() {} |
151 | 135 |
152 } // namespace syncer | 136 } // namespace syncer |
OLD | NEW |