summaryrefslogtreecommitdiffstats
path: root/sync/internal_api/public
diff options
context:
space:
mode:
Diffstat (limited to 'sync/internal_api/public')
-rw-r--r--sync/internal_api/public/base/model_type.h54
-rw-r--r--sync/internal_api/public/base/model_type_payload_map.cc9
-rw-r--r--sync/internal_api/public/base/model_type_payload_map.h15
-rw-r--r--sync/internal_api/public/base/model_type_payload_map_unittest.cc32
-rw-r--r--sync/internal_api/public/base/model_type_test_util.cc2
-rw-r--r--sync/internal_api/public/base/model_type_test_util.h2
-rw-r--r--sync/internal_api/public/base_node.h6
-rw-r--r--sync/internal_api/public/base_transaction.h3
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.cc14
-rw-r--r--sync/internal_api/public/engine/model_safe_worker.h10
-rw-r--r--sync/internal_api/public/engine/model_safe_worker_unittest.cc34
-rw-r--r--sync/internal_api/public/engine/sync_status.h4
-rw-r--r--sync/internal_api/public/read_node.h2
-rw-r--r--sync/internal_api/public/sessions/model_neutral_state.h4
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.cc12
-rw-r--r--sync/internal_api/public/sessions/sync_session_snapshot.h12
-rw-r--r--sync/internal_api/public/sessions/sync_source_info.cc7
-rw-r--r--sync/internal_api/public/sessions/sync_source_info.h6
-rw-r--r--sync/internal_api/public/sync_manager.h28
-rw-r--r--sync/internal_api/public/test/test_entry_factory.h6
-rw-r--r--sync/internal_api/public/write_node.h8
21 files changed, 96 insertions, 174 deletions
diff --git a/sync/internal_api/public/base/model_type.h b/sync/internal_api/public/base/model_type.h
index 77c2344..c8b1948 100644
--- a/sync/internal_api/public/base/model_type.h
+++ b/sync/internal_api/public/base/model_type.h
@@ -30,8 +30,6 @@ class SyncEntity;
namespace syncer {
-namespace syncable {
-
enum ModelType {
// Object type unknown. Objects may transition through
// the unknown state during their initial creation, before
@@ -103,7 +101,7 @@ inline ModelType ModelTypeFromInt(int i) {
return static_cast<ModelType>(i);
}
-void AddDefaultFieldValue(syncable::ModelType datatype,
+void AddDefaultFieldValue(ModelType datatype,
sync_pb::EntitySpecifics* specifics);
// Extract the model type of a SyncEntity protocol buffer. ModelType is a
@@ -172,56 +170,6 @@ bool NotificationTypeToRealModelType(const std::string& notification_type,
// Returns true if |model_type| is a real datatype
bool IsRealDataType(ModelType model_type);
-} // namespace syncable
-
} // namespace syncer
-// TODO(akalin): Move the names below to the 'syncer' namespace once
-// we move this file to public/base.
-namespace syncable {
-
-using syncer::syncable::ModelType;
-using syncer::syncable::ModelTypeSet;
-using syncer::syncable::FullModelTypeSet;
-using syncer::syncable::UNSPECIFIED;
-using syncer::syncable::TOP_LEVEL_FOLDER;
-using syncer::syncable::BOOKMARKS;
-using syncer::syncable::FIRST_REAL_MODEL_TYPE;
-using syncer::syncable::PREFERENCES;
-using syncer::syncable::PASSWORDS;
-using syncer::syncable::AUTOFILL_PROFILE;
-using syncer::syncable::AUTOFILL;
-using syncer::syncable::THEMES;
-using syncer::syncable::TYPED_URLS;
-using syncer::syncable::EXTENSIONS;
-using syncer::syncable::NIGORI;
-using syncer::syncable::SEARCH_ENGINES;
-using syncer::syncable::SESSIONS;
-using syncer::syncable::APPS;
-using syncer::syncable::APP_SETTINGS;
-using syncer::syncable::EXTENSION_SETTINGS;
-using syncer::syncable::APP_NOTIFICATIONS;
-using syncer::syncable::LAST_REAL_MODEL_TYPE;
-using syncer::syncable::MODEL_TYPE_COUNT;
-using syncer::syncable::ModelTypeFromInt;
-using syncer::syncable::AddDefaultFieldValue;
-using syncer::syncable::GetModelType;
-using syncer::syncable::GetModelTypeFromSpecifics;
-using syncer::syncable::ShouldMaintainPosition;
-using syncer::syncable::GetModelTypeFromSpecificsFieldNumber;
-using syncer::syncable::GetSpecificsFieldNumberFromModelType;
-using syncer::syncable::ModelTypeToString;
-using syncer::syncable::ModelTypeToValue;
-using syncer::syncable::ModelTypeFromValue;
-using syncer::syncable::ModelTypeFromString;
-using syncer::syncable::ModelTypeSetToString;
-using syncer::syncable::ModelTypeSetToValue;
-using syncer::syncable::ModelTypeSetFromValue;
-using syncer::syncable::ModelTypeToRootTag;
-using syncer::syncable::RealModelTypeToNotificationType;
-using syncer::syncable::NotificationTypeToRealModelType;
-using syncer::syncable::IsRealDataType;
-
-} // namespace syncable
-
#endif // SYNC_INTERNAL_API_PUBLIC_BASE_MODEL_TYPE_H_
diff --git a/sync/internal_api/public/base/model_type_payload_map.cc b/sync/internal_api/public/base/model_type_payload_map.cc
index 8fb458c..04222ee 100644
--- a/sync/internal_api/public/base/model_type_payload_map.cc
+++ b/sync/internal_api/public/base/model_type_payload_map.cc
@@ -12,13 +12,12 @@
#include "base/values.h"
namespace syncer {
-namespace syncable {
ModelTypePayloadMap ModelTypePayloadMapFromEnumSet(
- syncable::ModelTypeSet types,
+ syncer::ModelTypeSet types,
const std::string& payload) {
ModelTypePayloadMap types_with_payloads;
- for (syncable::ModelTypeSet::Iterator it = types.First();
+ for (syncer::ModelTypeSet::Iterator it = types.First();
it.Good(); it.Inc()) {
types_with_payloads[it.Get()] = payload;
}
@@ -53,7 +52,7 @@ DictionaryValue* ModelTypePayloadMapToValue(
std::string base64_marker;
bool encoded = base::Base64Encode(it->second, &base64_marker);
DCHECK(encoded);
- value->SetString(syncable::ModelTypeToString(it->first), base64_marker);
+ value->SetString(syncer::ModelTypeToString(it->first), base64_marker);
}
return value;
}
@@ -74,6 +73,4 @@ void CoalescePayloads(ModelTypePayloadMap* original,
}
}
-} // namespace syncable
} // namespace syncer
-
diff --git a/sync/internal_api/public/base/model_type_payload_map.h b/sync/internal_api/public/base/model_type_payload_map.h
index b95e152..da708f7 100644
--- a/sync/internal_api/public/base/model_type_payload_map.h
+++ b/sync/internal_api/public/base/model_type_payload_map.h
@@ -18,7 +18,6 @@ class DictionaryValue;
}
namespace syncer {
-namespace syncable {
// A container that contains a set of datatypes with possible string
// payloads.
@@ -46,20 +45,6 @@ base::DictionaryValue* ModelTypePayloadMapToValue(
void CoalescePayloads(ModelTypePayloadMap* original,
const ModelTypePayloadMap& update);
-} // namespace syncable
} // namespace syncer
-// TODO(akalin): Move the names below to the 'syncer' namespace once
-// we move this file to public/base.
-namespace syncable {
-
-using ::syncer::syncable::ModelTypePayloadMap;
-using ::syncer::syncable::ModelTypePayloadMapFromEnumSet;
-using ::syncer::syncable::ModelTypePayloadMapToEnumSet;
-using ::syncer::syncable::ModelTypePayloadMapToString;
-using ::syncer::syncable::ModelTypePayloadMapToValue;
-using ::syncer::syncable::CoalescePayloads;
-
-} // namespace syncable
-
#endif // SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_PAYLOAD_MAP_H_
diff --git a/sync/internal_api/public/base/model_type_payload_map_unittest.cc b/sync/internal_api/public/base/model_type_payload_map_unittest.cc
index 485048d..1a20867 100644
--- a/sync/internal_api/public/base/model_type_payload_map_unittest.cc
+++ b/sync/internal_api/public/base/model_type_payload_map_unittest.cc
@@ -13,7 +13,6 @@
#include "testing/gtest/include/gtest/gtest.h"
namespace syncer {
-namespace syncable {
namespace {
using base::ExpectDictStringValue;
@@ -44,32 +43,31 @@ TEST_F(ModelTypePayloadMapTest, TypePayloadMapToValue) {
}
TEST_F(ModelTypePayloadMapTest, CoalescePayloads) {
- syncable::ModelTypePayloadMap original;
+ syncer::ModelTypePayloadMap original;
std::string empty_payload;
std::string payload1 = "payload1";
std::string payload2 = "payload2";
std::string payload3 = "payload3";
- original[syncable::BOOKMARKS] = empty_payload;
- original[syncable::PASSWORDS] = payload1;
- original[syncable::AUTOFILL] = payload2;
- original[syncable::THEMES] = payload3;
+ original[syncer::BOOKMARKS] = empty_payload;
+ original[syncer::PASSWORDS] = payload1;
+ original[syncer::AUTOFILL] = payload2;
+ original[syncer::THEMES] = payload3;
- syncable::ModelTypePayloadMap update;
- update[syncable::BOOKMARKS] = empty_payload; // Same.
- update[syncable::PASSWORDS] = empty_payload; // Overwrite with empty.
- update[syncable::AUTOFILL] = payload1; // Overwrite with non-empty.
- update[syncable::SESSIONS] = payload2; // New.
+ syncer::ModelTypePayloadMap update;
+ update[syncer::BOOKMARKS] = empty_payload; // Same.
+ update[syncer::PASSWORDS] = empty_payload; // Overwrite with empty.
+ update[syncer::AUTOFILL] = payload1; // Overwrite with non-empty.
+ update[syncer::SESSIONS] = payload2; // New.
// Themes untouched.
CoalescePayloads(&original, update);
ASSERT_EQ(5U, original.size());
- EXPECT_EQ(empty_payload, original[syncable::BOOKMARKS]);
- EXPECT_EQ(payload1, original[syncable::PASSWORDS]);
- EXPECT_EQ(payload1, original[syncable::AUTOFILL]);
- EXPECT_EQ(payload2, original[syncable::SESSIONS]);
- EXPECT_EQ(payload3, original[syncable::THEMES]);
+ EXPECT_EQ(empty_payload, original[syncer::BOOKMARKS]);
+ EXPECT_EQ(payload1, original[syncer::PASSWORDS]);
+ EXPECT_EQ(payload1, original[syncer::AUTOFILL]);
+ EXPECT_EQ(payload2, original[syncer::SESSIONS]);
+ EXPECT_EQ(payload3, original[syncer::THEMES]);
}
} // namespace
-} // namespace syncable
} // namespace syncer
diff --git a/sync/internal_api/public/base/model_type_test_util.cc b/sync/internal_api/public/base/model_type_test_util.cc
index 5c07e8c..8c1164b 100644
--- a/sync/internal_api/public/base/model_type_test_util.cc
+++ b/sync/internal_api/public/base/model_type_test_util.cc
@@ -5,7 +5,6 @@
#include "sync/internal_api/public/base/model_type_test_util.h"
namespace syncer {
-namespace syncable {
void PrintTo(ModelTypeSet model_types, ::std::ostream* os) {
*os << ModelTypeSetToString(model_types);
@@ -50,5 +49,4 @@ class HasModelTypesMatcher
return ::testing::MakeMatcher(new HasModelTypesMatcher(expected_types));
}
-} // namespace syncable
} // namespace syncer
diff --git a/sync/internal_api/public/base/model_type_test_util.h b/sync/internal_api/public/base/model_type_test_util.h
index 4f5b804..0bac4b7 100644
--- a/sync/internal_api/public/base/model_type_test_util.h
+++ b/sync/internal_api/public/base/model_type_test_util.h
@@ -12,7 +12,6 @@
#include "testing/gmock/include/gmock/gmock.h"
namespace syncer {
-namespace syncable {
// Defined for googletest. Forwards to ModelTypeSetToString().
void PrintTo(ModelTypeSet model_types, ::std::ostream* os);
@@ -22,7 +21,6 @@ void PrintTo(ModelTypeSet model_types, ::std::ostream* os);
// EXPECT_CALL(mock, ProcessModelTypes(HasModelTypes(expected_types)));
::testing::Matcher<ModelTypeSet> HasModelTypes(ModelTypeSet expected_types);
-} // namespace syncable
} // namespace syncer
#endif // SYNC_INTERNAL_PUBLIC_API_BASE_MODEL_TYPE_TEST_UTIL_H_
diff --git a/sync/internal_api/public/base_node.h b/sync/internal_api/public/base_node.h
index 7112d73..7212927 100644
--- a/sync/internal_api/public/base_node.h
+++ b/sync/internal_api/public/base_node.h
@@ -79,7 +79,7 @@ class BaseNode {
// by doing a client tag lookup. Returns false on failure. A deleted node
// will return FALSE.
virtual InitByLookupResult InitByClientTagLookup(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
const std::string& tag) = 0;
// Each object is identified by a 64-bit id (internally, the syncable
@@ -107,7 +107,7 @@ class BaseNode {
// Returns the model type of this object. The model type is set at node
// creation time and is expected never to change.
- syncable::ModelType GetModelType() const;
+ syncer::ModelType GetModelType() const;
// Getter specific to the BOOKMARK datatype. Returns protobuf
// data. Can only be called if GetModelType() == BOOKMARK.
@@ -203,7 +203,7 @@ class BaseNode {
virtual ~BaseNode();
// The server has a size limit on client tags, so we generate a fixed length
// hash locally. This also ensures that ModelTypes have unique namespaces.
- static std::string GenerateSyncableHash(syncable::ModelType model_type,
+ static std::string GenerateSyncableHash(syncer::ModelType model_type,
const std::string& client_tag);
// Determines whether part of the entry is encrypted, and if so attempts to
diff --git a/sync/internal_api/public/base_transaction.h b/sync/internal_api/public/base_transaction.h
index 09d8a58..7781692 100644
--- a/sync/internal_api/public/base_transaction.h
+++ b/sync/internal_api/public/base_transaction.h
@@ -46,8 +46,7 @@ class BaseTransaction {
DISALLOW_COPY_AND_ASSIGN(BaseTransaction);
};
-syncable::ModelTypeSet GetEncryptedTypes(
- const syncer::BaseTransaction* trans);
+syncer::ModelTypeSet GetEncryptedTypes(const syncer::BaseTransaction* trans);
} // namespace syncer
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;
diff --git a/sync/internal_api/public/read_node.h b/sync/internal_api/public/read_node.h
index c3947a7..f253fc3 100644
--- a/sync/internal_api/public/read_node.h
+++ b/sync/internal_api/public/read_node.h
@@ -30,7 +30,7 @@ class ReadNode : public BaseNode {
// BaseNode implementation.
virtual InitByLookupResult InitByIdLookup(int64 id) OVERRIDE;
virtual InitByLookupResult InitByClientTagLookup(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
const std::string& tag) OVERRIDE;
// There is always a root node, so this can't fail. The root node is
diff --git a/sync/internal_api/public/sessions/model_neutral_state.h b/sync/internal_api/public/sessions/model_neutral_state.h
index fa127b0..d9d53ab 100644
--- a/sync/internal_api/public/sessions/model_neutral_state.h
+++ b/sync/internal_api/public/sessions/model_neutral_state.h
@@ -24,7 +24,7 @@ struct ModelNeutralState {
// We GetUpdates for some combination of types at once.
// requested_update_types stores the set of types which were requested.
- syncable::ModelTypeSet updates_request_types;
+ syncer::ModelTypeSet updates_request_types;
sync_pb::ClientToServerResponse updates_response;
@@ -40,7 +40,7 @@ struct ModelNeutralState {
// If the syncer encountered a MIGRATION_DONE code, these are the types that
// the client must now "migrate", by purging and re-downloading all updates.
- syncable::ModelTypeSet types_needing_local_migration;
+ syncer::ModelTypeSet types_needing_local_migration;
// Overwrites due to conflict resolution counters.
int num_local_overwrites;
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.cc b/sync/internal_api/public/sessions/sync_session_snapshot.cc
index 4427236..4d966dee 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.cc
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.cc
@@ -27,8 +27,8 @@ SyncSessionSnapshot::SyncSessionSnapshot()
SyncSessionSnapshot::SyncSessionSnapshot(
const ModelNeutralState& model_neutral_state,
bool is_share_usable,
- syncable::ModelTypeSet initial_sync_ended,
- const syncable::ModelTypePayloadMap& download_progress_markers,
+ syncer::ModelTypeSet initial_sync_ended,
+ const syncer::ModelTypePayloadMap& download_progress_markers,
bool more_to_sync,
bool is_silenced,
int num_encryption_conflicts,
@@ -80,9 +80,9 @@ DictionaryValue* SyncSessionSnapshot::ToValue() const {
static_cast<int>(model_neutral_state_.num_server_changes_remaining));
value->SetBoolean("isShareUsable", is_share_usable_);
value->Set("initialSyncEnded",
- syncable::ModelTypeSetToValue(initial_sync_ended_));
+ syncer::ModelTypeSetToValue(initial_sync_ended_));
value->Set("downloadProgressMarkers",
- syncable::ModelTypePayloadMapToValue(download_progress_markers_));
+ syncer::ModelTypePayloadMapToValue(download_progress_markers_));
value->SetBoolean("hasMoreToSync", has_more_to_sync_);
value->SetBoolean("isSilenced", is_silenced_);
// We don't care too much if we lose precision here, also.
@@ -117,11 +117,11 @@ bool SyncSessionSnapshot::is_share_usable() const {
return is_share_usable_;
}
-syncable::ModelTypeSet SyncSessionSnapshot::initial_sync_ended() const {
+syncer::ModelTypeSet SyncSessionSnapshot::initial_sync_ended() const {
return initial_sync_ended_;
}
-syncable::ModelTypePayloadMap
+syncer::ModelTypePayloadMap
SyncSessionSnapshot::download_progress_markers() const {
return download_progress_markers_;
}
diff --git a/sync/internal_api/public/sessions/sync_session_snapshot.h b/sync/internal_api/public/sessions/sync_session_snapshot.h
index 2363878..7c88753 100644
--- a/sync/internal_api/public/sessions/sync_session_snapshot.h
+++ b/sync/internal_api/public/sessions/sync_session_snapshot.h
@@ -33,8 +33,8 @@ class SyncSessionSnapshot {
SyncSessionSnapshot(
const ModelNeutralState& model_neutral_state,
bool is_share_usable,
- syncable::ModelTypeSet initial_sync_ended,
- const syncable::ModelTypePayloadMap& download_progress_markers,
+ syncer::ModelTypeSet initial_sync_ended,
+ const syncer::ModelTypePayloadMap& download_progress_markers,
bool more_to_sync,
bool is_silenced,
int num_encryption_conflicts,
@@ -58,8 +58,8 @@ class SyncSessionSnapshot {
}
int64 num_server_changes_remaining() const;
bool is_share_usable() const;
- syncable::ModelTypeSet initial_sync_ended() const;
- syncable::ModelTypePayloadMap download_progress_markers() const;
+ syncer::ModelTypeSet initial_sync_ended() const;
+ syncer::ModelTypePayloadMap download_progress_markers() const;
bool has_more_to_sync() const;
bool is_silenced() const;
int num_encryption_conflicts() const;
@@ -75,8 +75,8 @@ class SyncSessionSnapshot {
private:
ModelNeutralState model_neutral_state_;
bool is_share_usable_;
- syncable::ModelTypeSet initial_sync_ended_;
- syncable::ModelTypePayloadMap download_progress_markers_;
+ syncer::ModelTypeSet initial_sync_ended_;
+ syncer::ModelTypePayloadMap download_progress_markers_;
bool has_more_to_sync_;
bool is_silenced_;
int num_encryption_conflicts_;
diff --git a/sync/internal_api/public/sessions/sync_source_info.cc b/sync/internal_api/public/sessions/sync_source_info.cc
index e4536ee..e133f08 100644
--- a/sync/internal_api/public/sessions/sync_source_info.cc
+++ b/sync/internal_api/public/sessions/sync_source_info.cc
@@ -13,13 +13,12 @@ namespace sessions {
SyncSourceInfo::SyncSourceInfo()
: updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN) {}
-SyncSourceInfo::SyncSourceInfo(
- const syncable::ModelTypePayloadMap& t)
+SyncSourceInfo::SyncSourceInfo(const syncer::ModelTypePayloadMap& t)
: updates_source(sync_pb::GetUpdatesCallerInfo::UNKNOWN), types(t) {}
SyncSourceInfo::SyncSourceInfo(
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u,
- const syncable::ModelTypePayloadMap& t)
+ const syncer::ModelTypePayloadMap& t)
: updates_source(u), types(t) {}
SyncSourceInfo::~SyncSourceInfo() {}
@@ -28,7 +27,7 @@ DictionaryValue* SyncSourceInfo::ToValue() const {
DictionaryValue* value = new DictionaryValue();
value->SetString("updatesSource",
GetUpdatesSourceString(updates_source));
- value->Set("types", syncable::ModelTypePayloadMapToValue(types));
+ value->Set("types", syncer::ModelTypePayloadMapToValue(types));
return value;
}
diff --git a/sync/internal_api/public/sessions/sync_source_info.h b/sync/internal_api/public/sessions/sync_source_info.h
index 6505411..812afb7 100644
--- a/sync/internal_api/public/sessions/sync_source_info.h
+++ b/sync/internal_api/public/sessions/sync_source_info.h
@@ -23,17 +23,17 @@ namespace sessions {
// specific payloads which should be sent to the server.
struct SyncSourceInfo {
SyncSourceInfo();
- explicit SyncSourceInfo(const syncable::ModelTypePayloadMap& t);
+ explicit SyncSourceInfo(const syncer::ModelTypePayloadMap& t);
SyncSourceInfo(
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& u,
- const syncable::ModelTypePayloadMap& t);
+ const syncer::ModelTypePayloadMap& t);
~SyncSourceInfo();
// Caller takes ownership of the returned dictionary.
base::DictionaryValue* ToValue() const;
sync_pb::GetUpdatesCallerInfo::GetUpdatesSource updates_source;
- syncable::ModelTypePayloadMap types;
+ syncer::ModelTypePayloadMap types;
};
} // namespace sessions
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index 8c196a1..75e55aa 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -122,7 +122,7 @@ class SyncManager {
// operations, a delete may temporarily orphan a node that is
// updated later in the list.
virtual void OnChangesApplied(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
const BaseTransaction* trans,
const ImmutableChangeRecordList& changes) = 0;
@@ -137,7 +137,7 @@ class SyncManager {
// those changes, let the transaction fall out of scope, and then commit
// those changes from within OnChangesComplete (postponing the blocking
// I/O to when it no longer holds any lock).
- virtual void OnChangesComplete(syncable::ModelType model_type) = 0;
+ virtual void OnChangesComplete(syncer::ModelType model_type) = 0;
protected:
virtual ~ChangeDelegate();
@@ -165,11 +165,11 @@ class SyncManager {
// be able to apply changes without being under a transaction.
// But that's a ways off...
virtual void OnChangesApplied(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
int64 write_transaction_id,
const ImmutableChangeRecordList& changes) = 0;
- virtual void OnChangesComplete(syncable::ModelType model_type) = 0;
+ virtual void OnChangesComplete(syncer::ModelType model_type) = 0;
protected:
virtual ~ChangeObserver();
@@ -324,7 +324,7 @@ class SyncManager {
//
// Called from within a transaction.
virtual void OnEncryptedTypesChanged(
- syncable::ModelTypeSet encrypted_types,
+ syncer::ModelTypeSet encrypted_types,
bool encrypt_everything) = 0;
// Called after we finish encrypting the current set of encrypted
@@ -399,13 +399,13 @@ class SyncManager {
void ThrowUnrecoverableError();
// Returns the set of types for which we have stored some sync data.
- syncable::ModelTypeSet InitialSyncEndedTypes();
+ syncer::ModelTypeSet InitialSyncEndedTypes();
// Update tokens that we're using in Sync. Email must stay the same.
void UpdateCredentials(const SyncCredentials& credentials);
// Called when the user disables or enables a sync type.
- void UpdateEnabledTypes(const syncable::ModelTypeSet& enabled_types);
+ void UpdateEnabledTypes(const syncer::ModelTypeSet& enabled_types);
// Put the syncer in normal mode ready to perform nudges and polls.
void StartSyncingNormally(
@@ -437,7 +437,7 @@ class SyncManager {
// Switches the mode of operation to CONFIGURATION_MODE and
// schedules a config task to fetch updates for |types|.
void RequestConfig(const syncer::ModelSafeRoutingInfo& routing_info,
- const syncable::ModelTypeSet& types,
+ const syncer::ModelTypeSet& types,
syncer::ConfigureReason reason);
void RequestCleanupDisabledTypes(
@@ -511,7 +511,7 @@ class SyncManager {
// Gets the set of encrypted types from the cryptographer
// Note: opens a transaction. May be called from any thread.
- syncable::ModelTypeSet GetEncryptedDataTypesForTest() const;
+ syncer::ModelTypeSet GetEncryptedDataTypesForTest() const;
// Reads the nigori node to determine if any experimental features should
// be enabled.
@@ -529,7 +529,7 @@ class SyncManager {
void SimulateDisableNotificationsForTest(int reason);
void TriggerOnIncomingNotificationForTest(
- syncable::ModelTypeSet model_types);
+ syncer::ModelTypeSet model_types);
static const int kDefaultNudgeDelayMilliseconds;
static const int kPreferencesNudgeDelayMilliseconds;
@@ -541,7 +541,7 @@ class SyncManager {
FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest);
// For unit tests.
- base::TimeDelta GetNudgeDelayTimeDelta(const syncable::ModelType& model_type);
+ base::TimeDelta GetNudgeDelayTimeDelta(const syncer::ModelType& model_type);
base::ThreadChecker thread_checker_;
@@ -551,10 +551,10 @@ class SyncManager {
DISALLOW_COPY_AND_ASSIGN(SyncManager);
};
-bool InitialSyncEndedForTypes(syncable::ModelTypeSet types, UserShare* share);
+bool InitialSyncEndedForTypes(syncer::ModelTypeSet types, UserShare* share);
-syncable::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
- syncable::ModelTypeSet types,
+syncer::ModelTypeSet GetTypesWithEmptyProgressMarkerToken(
+ syncer::ModelTypeSet types,
syncer::UserShare* share);
const char* ConnectionStatusToString(ConnectionStatus status);
diff --git a/sync/internal_api/public/test/test_entry_factory.h b/sync/internal_api/public/test/test_entry_factory.h
index bcf5316..931b8e7 100644
--- a/sync/internal_api/public/test/test_entry_factory.h
+++ b/sync/internal_api/public/test/test_entry_factory.h
@@ -42,18 +42,18 @@ class TestEntryFactory {
const syncable::Id& parent_id,
const std::string& name,
bool is_folder,
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
int64* metahandle_out);
// Creates an item that is both unsynced an an unapplied update. Returns the
// metahandle of the created item.
int64 CreateUnappliedAndUnsyncedItem(const std::string& name,
- syncable::ModelType model_type);
+ syncer::ModelType model_type);
// Creates an item that has neither IS_UNSYNED or IS_UNAPPLIED_UPDATE. The
// item is known to both the server and client. Returns the metahandle of
// the created item.
- int64 CreateSyncedItem(const std::string& name, syncable::ModelType
+ int64 CreateSyncedItem(const std::string& name, syncer::ModelType
model_type, bool is_folder);
int64 GetNextRevision();
diff --git a/sync/internal_api/public/write_node.h b/sync/internal_api/public/write_node.h
index 29182de..2965741 100644
--- a/sync/internal_api/public/write_node.h
+++ b/sync/internal_api/public/write_node.h
@@ -65,7 +65,7 @@ class WriteNode : public BaseNode {
// BaseNode implementation.
virtual InitByLookupResult InitByIdLookup(int64 id) OVERRIDE;
virtual InitByLookupResult InitByClientTagLookup(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
const std::string& tag) OVERRIDE;
// Create a new node with the specified parent and predecessor. |model_type|
@@ -74,7 +74,7 @@ class WriteNode : public BaseNode {
// to indicate that this is to be the first child.
// |predecessor| must be a child of |new_parent| or NULL. Returns false on
// failure.
- bool InitByCreation(syncable::ModelType model_type,
+ bool InitByCreation(syncer::ModelType model_type,
const BaseNode& parent,
const BaseNode* predecessor);
@@ -85,7 +85,7 @@ class WriteNode : public BaseNode {
// actually undelete it
// Client unique tagged nodes must NOT be folders.
InitUniqueByCreationResult InitUniqueByCreation(
- syncable::ModelType model_type,
+ syncer::ModelType model_type,
const BaseNode& parent,
const std::string& client_tag);
@@ -178,7 +178,7 @@ class WriteNode : public BaseNode {
void* operator new(size_t size); // Node is meant for stack use only.
// Helper to set model type. This will clear any specifics data.
- void PutModelType(syncable::ModelType model_type);
+ void PutModelType(syncer::ModelType model_type);
// Helper to set the previous node.
bool PutPredecessor(const BaseNode* predecessor) WARN_UNUSED_RESULT;