| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 5 #ifndef SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
| 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 6 #define SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/callback.h" | 13 #include "base/callback.h" |
| 14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 15 #include "sync/internal_api/public/syncable/model_type.h" | 15 #include "sync/internal_api/public/syncable/model_type.h" |
| 16 #include "sync/internal_api/public/util/syncer_error.h" | 16 #include "sync/internal_api/public/util/syncer_error.h" |
| 17 | 17 |
| 18 namespace base { | 18 namespace base { |
| 19 class DictionaryValue; | 19 class DictionaryValue; |
| 20 } // namespace | 20 } // namespace |
| 21 | 21 |
| 22 namespace csync { | 22 namespace syncer { |
| 23 | 23 |
| 24 typedef base::Callback<enum SyncerError(void)> WorkCallback; | 24 typedef base::Callback<enum SyncerError(void)> WorkCallback; |
| 25 | 25 |
| 26 enum ModelSafeGroup { | 26 enum ModelSafeGroup { |
| 27 GROUP_PASSIVE = 0, // Models that are just "passively" being synced; e.g. | 27 GROUP_PASSIVE = 0, // Models that are just "passively" being synced; e.g. |
| 28 // changes to these models don't need to be pushed to a | 28 // changes to these models don't need to be pushed to a |
| 29 // native model. | 29 // native model. |
| 30 GROUP_UI, // Models that live on UI thread and are being synced. | 30 GROUP_UI, // Models that live on UI thread and are being synced. |
| 31 GROUP_DB, // Models that live on DB thread and are being synced. | 31 GROUP_DB, // Models that live on DB thread and are being synced. |
| 32 GROUP_FILE, // Models that live on FILE thread and are being synced. | 32 GROUP_FILE, // Models that live on FILE thread and are being synced. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 | 75 |
| 76 std::string ModelSafeRoutingInfoToString( | 76 std::string ModelSafeRoutingInfoToString( |
| 77 const ModelSafeRoutingInfo& routing_info); | 77 const ModelSafeRoutingInfo& routing_info); |
| 78 | 78 |
| 79 syncable::ModelTypeSet GetRoutingInfoTypes( | 79 syncable::ModelTypeSet GetRoutingInfoTypes( |
| 80 const ModelSafeRoutingInfo& routing_info); | 80 const ModelSafeRoutingInfo& routing_info); |
| 81 | 81 |
| 82 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, | 82 ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, |
| 83 const ModelSafeRoutingInfo& routes); | 83 const ModelSafeRoutingInfo& routes); |
| 84 | 84 |
| 85 } // namespace csync | 85 } // namespace syncer |
| 86 | 86 |
| 87 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ | 87 #endif // SYNC_INTERNAL_API_PUBLIC_ENGINE_MODEL_SAFE_WORKER_H_ |
| OLD | NEW |