diff options
Diffstat (limited to 'sync/internal_api/public/engine')
4 files changed, 31 insertions, 31 deletions
diff --git a/sync/internal_api/public/engine/model_safe_worker.cc b/sync/internal_api/public/engine/model_safe_worker.cc index f3722d4..7623cd3 100644 --- a/sync/internal_api/public/engine/model_safe_worker.cc +++ b/sync/internal_api/public/engine/model_safe_worker.cc @@ -15,7 +15,7 @@ base::DictionaryValue* ModelSafeRoutingInfoToValue( base::DictionaryValue* dict = new base::DictionaryValue(); for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin(); it != routing_info.end(); ++it) { - dict->SetString(syncable::ModelTypeToString(it->first), + dict->SetString(syncer::ModelTypeToString(it->first), ModelSafeGroupToString(it->second)); } return dict; @@ -29,10 +29,10 @@ std::string ModelSafeRoutingInfoToString( return json; } -syncable::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap( +syncer::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap( const ModelSafeRoutingInfo& routes, const std::string& payload) { - syncable::ModelTypePayloadMap types_with_payloads; + syncer::ModelTypePayloadMap types_with_payloads; for (ModelSafeRoutingInfo::const_iterator i = routes.begin(); i != routes.end(); ++i) { types_with_payloads[i->first] = payload; @@ -40,9 +40,9 @@ syncable::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap( return types_with_payloads; } -syncable::ModelTypeSet GetRoutingInfoTypes( +syncer::ModelTypeSet GetRoutingInfoTypes( const ModelSafeRoutingInfo& routing_info) { - syncable::ModelTypeSet types; + syncer::ModelTypeSet types; for (ModelSafeRoutingInfo::const_iterator it = routing_info.begin(); it != routing_info.end(); ++it) { types.Put(it->first); @@ -50,11 +50,11 @@ syncable::ModelTypeSet GetRoutingInfoTypes( return types; } -ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, +ModelSafeGroup GetGroupForModelType(const syncer::ModelType type, const ModelSafeRoutingInfo& routes) { ModelSafeRoutingInfo::const_iterator it = routes.find(type); if (it == routes.end()) { - if (type != syncable::UNSPECIFIED && type != syncable::TOP_LEVEL_FOLDER) + if (type != syncer::UNSPECIFIED && type != syncer::TOP_LEVEL_FOLDER) LOG(WARNING) << "Entry does not belong to active ModelSafeGroup!"; return GROUP_PASSIVE; } diff --git a/sync/internal_api/public/engine/model_safe_worker.h b/sync/internal_api/public/engine/model_safe_worker.h index ce14c1d..5c9c7ae 100644 --- a/sync/internal_api/public/engine/model_safe_worker.h +++ b/sync/internal_api/public/engine/model_safe_worker.h @@ -64,10 +64,10 @@ class ModelSafeWorker : public base::RefCountedThreadSafe<ModelSafeWorker> { friend class base::RefCountedThreadSafe<ModelSafeWorker>; }; -// A map that details which ModelSafeGroup each syncable::ModelType +// A map that details which ModelSafeGroup each syncer::ModelType // belongs to. Routing info can change in response to the user enabling / // disabling sync for certain types, as well as model association completions. -typedef std::map<syncable::ModelType, ModelSafeGroup> +typedef std::map<syncer::ModelType, ModelSafeGroup> ModelSafeRoutingInfo; // Caller takes ownership of return value. @@ -79,14 +79,14 @@ std::string ModelSafeRoutingInfoToString( // Make a ModelTypePayloadMap for all the enabled types in a // ModelSafeRoutingInfo using a default payload. -syncable::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap( +syncer::ModelTypePayloadMap ModelSafeRoutingInfoToPayloadMap( const ModelSafeRoutingInfo& routes, const std::string& payload); -syncable::ModelTypeSet GetRoutingInfoTypes( +syncer::ModelTypeSet GetRoutingInfoTypes( const ModelSafeRoutingInfo& routing_info); -ModelSafeGroup GetGroupForModelType(const syncable::ModelType type, +ModelSafeGroup GetGroupForModelType(const syncer::ModelType type, const ModelSafeRoutingInfo& routes); } // namespace syncer diff --git a/sync/internal_api/public/engine/model_safe_worker_unittest.cc b/sync/internal_api/public/engine/model_safe_worker_unittest.cc index a25e0b1..b1036b5 100644 --- a/sync/internal_api/public/engine/model_safe_worker_unittest.cc +++ b/sync/internal_api/public/engine/model_safe_worker_unittest.cc @@ -16,9 +16,9 @@ class ModelSafeWorkerTest : public ::testing::Test { TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) { ModelSafeRoutingInfo routing_info; - routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE; - routing_info[syncable::NIGORI] = GROUP_UI; - routing_info[syncable::PREFERENCES] = GROUP_DB; + routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE; + routing_info[syncer::NIGORI] = GROUP_UI; + routing_info[syncer::PREFERENCES] = GROUP_DB; DictionaryValue expected_value; expected_value.SetString("Bookmarks", "GROUP_PASSIVE"); expected_value.SetString("Encryption keys", "GROUP_UI"); @@ -30,9 +30,9 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToValue) { TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToString) { ModelSafeRoutingInfo routing_info; - routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE; - routing_info[syncable::NIGORI] = GROUP_UI; - routing_info[syncable::PREFERENCES] = GROUP_DB; + routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE; + routing_info[syncer::NIGORI] = GROUP_UI; + routing_info[syncer::PREFERENCES] = GROUP_DB; EXPECT_EQ( "{\"Bookmarks\":\"GROUP_PASSIVE\",\"Encryption keys\":\"GROUP_UI\"," "\"Preferences\":\"GROUP_DB\"}", @@ -41,23 +41,23 @@ TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToString) { TEST_F(ModelSafeWorkerTest, GetRoutingInfoTypes) { ModelSafeRoutingInfo routing_info; - routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE; - routing_info[syncable::NIGORI] = GROUP_UI; - routing_info[syncable::PREFERENCES] = GROUP_DB; - const syncable::ModelTypeSet expected_types( - syncable::BOOKMARKS, - syncable::NIGORI, - syncable::PREFERENCES); + routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE; + routing_info[syncer::NIGORI] = GROUP_UI; + routing_info[syncer::PREFERENCES] = GROUP_DB; + const syncer::ModelTypeSet expected_types( + syncer::BOOKMARKS, + syncer::NIGORI, + syncer::PREFERENCES); EXPECT_TRUE(GetRoutingInfoTypes(routing_info).Equals(expected_types)); } TEST_F(ModelSafeWorkerTest, ModelSafeRoutingInfoToPayloadMap) { std::string payload = "test"; ModelSafeRoutingInfo routing_info; - routing_info[syncable::BOOKMARKS] = GROUP_PASSIVE; - routing_info[syncable::NIGORI] = GROUP_UI; - routing_info[syncable::PREFERENCES] = GROUP_DB; - syncable::ModelTypePayloadMap types_with_payloads = + routing_info[syncer::BOOKMARKS] = GROUP_PASSIVE; + routing_info[syncer::NIGORI] = GROUP_UI; + routing_info[syncer::PREFERENCES] = GROUP_DB; + syncer::ModelTypePayloadMap types_with_payloads = ModelSafeRoutingInfoToPayloadMap(routing_info, payload); ASSERT_EQ(routing_info.size(), types_with_payloads.size()); for (ModelSafeRoutingInfo::iterator iter = routing_info.begin(); diff --git a/sync/internal_api/public/engine/sync_status.h b/sync/internal_api/public/engine/sync_status.h index c9cff52..5e330ac 100644 --- a/sync/internal_api/public/engine/sync_status.h +++ b/sync/internal_api/public/engine/sync_status.h @@ -80,12 +80,12 @@ struct SyncStatus { int useful_sync_cycles; // Encryption related. - syncable::ModelTypeSet encrypted_types; + syncer::ModelTypeSet encrypted_types; bool cryptographer_ready; bool crypto_has_pending_keys; // Per-datatype throttled status. - syncable::ModelTypeSet throttled_types; + syncer::ModelTypeSet throttled_types; // The unique identifer for this client. std::string unique_id; |