| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 // See the implementation and Core::DoShutdown for details. | 135 // See the implementation and Core::DoShutdown for details. |
| 136 void Shutdown(bool sync_disabled); | 136 void Shutdown(bool sync_disabled); |
| 137 | 137 |
| 138 // Changes the set of data types that are currently being synced. | 138 // Changes the set of data types that are currently being synced. |
| 139 // The ready_task will be run when all of the requested data types | 139 // The ready_task will be run when all of the requested data types |
| 140 // are up-to-date and ready for activation. The task will cancelled | 140 // are up-to-date and ready for activation. The task will cancelled |
| 141 // upon shutdown. The method takes ownership of the task pointer. | 141 // upon shutdown. The method takes ownership of the task pointer. |
| 142 virtual void ConfigureDataTypes(const syncable::ModelTypeSet& types, | 142 virtual void ConfigureDataTypes(const syncable::ModelTypeSet& types, |
| 143 CancelableTask* ready_task); | 143 CancelableTask* ready_task); |
| 144 | 144 |
| 145 syncable::AutofillMigrationState |
| 146 GetAutofillMigrationState(); |
| 147 |
| 148 void SetAutofillMigrationState( |
| 149 syncable::AutofillMigrationState state); |
| 150 |
| 151 syncable::AutofillMigrationDebugInfo |
| 152 GetAutofillMigrationDebugInfo(); |
| 153 |
| 154 void SetAutofillMigrationDebugInfo( |
| 155 syncable::AutofillMigrationDebugInfo::PropertyToSet property_to_set, |
| 156 const syncable::AutofillMigrationDebugInfo& info); |
| 157 |
| 145 // Activates change processing for the given data type. This must | 158 // Activates change processing for the given data type. This must |
| 146 // be called synchronously with the data type's model association so | 159 // be called synchronously with the data type's model association so |
| 147 // no changes are dropped between model association and change | 160 // no changes are dropped between model association and change |
| 148 // processor activation. | 161 // processor activation. |
| 149 void ActivateDataType(DataTypeController* data_type_controller, | 162 void ActivateDataType(DataTypeController* data_type_controller, |
| 150 ChangeProcessor* change_processor); | 163 ChangeProcessor* change_processor); |
| 151 | 164 |
| 152 // Deactivates change processing for the given data type. | 165 // Deactivates change processing for the given data type. |
| 153 void DeactivateDataType(DataTypeController* data_type_controller, | 166 void DeactivateDataType(DataTypeController* data_type_controller, |
| 154 ChangeProcessor* change_processor); | 167 ChangeProcessor* change_processor); |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 void PersistEncryptionBootstrapToken(const std::string& token); | 451 void PersistEncryptionBootstrapToken(const std::string& token); |
| 439 std::string RestoreEncryptionBootstrapToken(); | 452 std::string RestoreEncryptionBootstrapToken(); |
| 440 | 453 |
| 441 // Our core, which communicates directly to the syncapi. | 454 // Our core, which communicates directly to the syncapi. |
| 442 scoped_refptr<Core> core_; | 455 scoped_refptr<Core> core_; |
| 443 | 456 |
| 444 private: | 457 private: |
| 445 | 458 |
| 446 UIModelWorker* ui_worker(); | 459 UIModelWorker* ui_worker(); |
| 447 | 460 |
| 461 void ConfigureAutofillMigration(); |
| 462 |
| 448 // A thread we dedicate for use by our Core to perform initialization, | 463 // A thread we dedicate for use by our Core to perform initialization, |
| 449 // authentication, handle messages from the syncapi, and periodically tell | 464 // authentication, handle messages from the syncapi, and periodically tell |
| 450 // the syncapi to persist itself. | 465 // the syncapi to persist itself. |
| 451 base::Thread core_thread_; | 466 base::Thread core_thread_; |
| 452 | 467 |
| 453 // A reference to the MessageLoop used to construct |this|, so we know how | 468 // A reference to the MessageLoop used to construct |this|, so we know how |
| 454 // to safely talk back to the SyncFrontend. | 469 // to safely talk back to the SyncFrontend. |
| 455 MessageLoop* const frontend_loop_; | 470 MessageLoop* const frontend_loop_; |
| 456 | 471 |
| 457 Profile* profile_; | 472 Profile* profile_; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 510 | 525 |
| 511 // Whether we've processed the initialization complete callback. | 526 // Whether we've processed the initialization complete callback. |
| 512 bool syncapi_initialized_; | 527 bool syncapi_initialized_; |
| 513 | 528 |
| 514 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 529 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 515 }; | 530 }; |
| 516 | 531 |
| 517 } // namespace browser_sync | 532 } // namespace browser_sync |
| 518 | 533 |
| 519 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 534 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |