| 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 #ifndef SYNC_INTERNAL_API_MODEL_TYPE_CONNECTOR_PROXY_H_ | 5 #ifndef COMPONENTS_SYNC_CORE_IMPL_MODEL_TYPE_CONNECTOR_PROXY_H_ |
| 6 #define SYNC_INTERNAL_API_MODEL_TYPE_CONNECTOR_PROXY_H_ | 6 #define COMPONENTS_SYNC_CORE_IMPL_MODEL_TYPE_CONNECTOR_PROXY_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "base/sequenced_task_runner.h" | 11 #include "base/sequenced_task_runner.h" |
| 12 #include "sync/base/sync_export.h" | 12 #include "components/sync/base/model_type.h" |
| 13 #include "sync/internal_api/public/base/model_type.h" | 13 #include "components/sync/base/sync_export.h" |
| 14 #include "sync/internal_api/public/model_type_connector.h" | 14 #include "components/sync/core/model_type_connector.h" |
| 15 | 15 |
| 16 namespace syncer_v2 { | 16 namespace syncer_v2 { |
| 17 | 17 |
| 18 // Proxies all ModelTypeConnector calls to another thread. Typically used by | 18 // Proxies all ModelTypeConnector calls to another thread. Typically used by |
| 19 // the SyncBackend to call from the UI thread to the real ModelTypeConnector on | 19 // the SyncBackend to call from the UI thread to the real ModelTypeConnector on |
| 20 // the sync thread. | 20 // the sync thread. |
| 21 class SYNC_EXPORT ModelTypeConnectorProxy : public ModelTypeConnector { | 21 class SYNC_EXPORT ModelTypeConnectorProxy : public ModelTypeConnector { |
| 22 public: | 22 public: |
| 23 ModelTypeConnectorProxy( | 23 ModelTypeConnectorProxy( |
| 24 const scoped_refptr<base::SequencedTaskRunner>& task_runner, | 24 const scoped_refptr<base::SequencedTaskRunner>& task_runner, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 35 // A SequencedTaskRunner representing the thread where the ModelTypeConnector | 35 // A SequencedTaskRunner representing the thread where the ModelTypeConnector |
| 36 // lives. | 36 // lives. |
| 37 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 37 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
| 38 | 38 |
| 39 // The ModelTypeConnector this object is wrapping. | 39 // The ModelTypeConnector this object is wrapping. |
| 40 base::WeakPtr<ModelTypeConnector> model_type_connector_; | 40 base::WeakPtr<ModelTypeConnector> model_type_connector_; |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 } // namespace syncer_v2 | 43 } // namespace syncer_v2 |
| 44 | 44 |
| 45 #endif // SYNC_INTERNAL_API_MODEL_TYPE_CONNECTOR_PROXY_H_ | 45 #endif // COMPONENTS_SYNC_CORE_IMPL_MODEL_TYPE_CONNECTOR_PROXY_H_ |
| OLD | NEW |