| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 std::string lsid; | 319 std::string lsid; |
| 320 bool delete_sync_data_folder; | 320 bool delete_sync_data_folder; |
| 321 std::string restored_key_for_bootstrapping; | 321 std::string restored_key_for_bootstrapping; |
| 322 bool setup_for_test_mode; | 322 bool setup_for_test_mode; |
| 323 }; | 323 }; |
| 324 | 324 |
| 325 // Called on |frontend_loop_|. | 325 // Called on |frontend_loop_|. |
| 326 void CreateSyncNotifier(const scoped_refptr<net::URLRequestContextGetter>& | 326 void CreateSyncNotifier(const scoped_refptr<net::URLRequestContextGetter>& |
| 327 request_context_getter); | 327 request_context_getter); |
| 328 | 328 |
| 329 | |
| 330 // Note: | 329 // Note: |
| 331 // | 330 // |
| 332 // The Do* methods are the various entry points from our SyncBackendHost. | 331 // The Do* methods are the various entry points from our SyncBackendHost. |
| 333 // It calls us on a dedicated thread to actually perform synchronous | 332 // It calls us on a dedicated thread to actually perform synchronous |
| 334 // (and potentially blocking) syncapi operations. | 333 // (and potentially blocking) syncapi operations. |
| 335 // | 334 // |
| 336 // Called on the SyncBackendHost core_thread_ to perform initialization | 335 // Called on the SyncBackendHost core_thread_ to perform initialization |
| 337 // of the syncapi on behalf of SyncBackendHost::Initialize. | 336 // of the syncapi on behalf of SyncBackendHost::Initialize. |
| 338 void DoInitialize(const DoInitializeOptions& options); | 337 void DoInitialize(const DoInitializeOptions& options); |
| 339 | 338 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 395 void DeleteSyncDataFolder(); | 394 void DeleteSyncDataFolder(); |
| 396 | 395 |
| 397 void ConnectChildJsEventRouter(); | 396 void ConnectChildJsEventRouter(); |
| 398 | 397 |
| 399 void DisconnectChildJsEventRouter(); | 398 void DisconnectChildJsEventRouter(); |
| 400 | 399 |
| 401 void DoProcessMessage( | 400 void DoProcessMessage( |
| 402 const std::string& name, const JsArgList& args, | 401 const std::string& name, const JsArgList& args, |
| 403 const JsEventHandler* sender); | 402 const JsEventHandler* sender); |
| 404 | 403 |
| 404 void DoStartConfigurationMode(); |
| 405 |
| 405 // A callback from the SyncerThread when it is safe to continue config. | 406 // A callback from the SyncerThread when it is safe to continue config. |
| 406 void FinishConfigureDataTypes(); | 407 void FinishConfigureDataTypes(); |
| 407 | 408 |
| 408 #if defined(UNIT_TEST) | 409 #if defined(UNIT_TEST) |
| 409 // Special form of initialization that does not try and authenticate the | 410 // Special form of initialization that does not try and authenticate the |
| 410 // last known user (since it will fail in test mode) and does some extra | 411 // last known user (since it will fail in test mode) and does some extra |
| 411 // setup to nudge the syncapi into a usable state. | 412 // setup to nudge the syncapi into a usable state. |
| 412 void DoInitializeForTest(const std::wstring& test_user, | 413 void DoInitializeForTest(const std::wstring& test_user, |
| 413 sync_api::HttpPostProviderFactory* factory, | 414 sync_api::HttpPostProviderFactory* factory, |
| 414 bool delete_sync_data_folder) { | 415 bool delete_sync_data_folder) { |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 662 |
| 662 // Whether we've processed the initialization complete callback. | 663 // Whether we've processed the initialization complete callback. |
| 663 bool syncapi_initialized_; | 664 bool syncapi_initialized_; |
| 664 | 665 |
| 665 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); | 666 DISALLOW_COPY_AND_ASSIGN(SyncBackendHost); |
| 666 }; | 667 }; |
| 667 | 668 |
| 668 } // namespace browser_sync | 669 } // namespace browser_sync |
| 669 | 670 |
| 670 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ | 671 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_H_ |
| OLD | NEW |