Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: sync/notifier/p2p_notifier.cc

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/notifier/p2p_notifier.h ('k') | sync/notifier/p2p_notifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/notifier/p2p_notifier.cc
diff --git a/sync/notifier/p2p_notifier.cc b/sync/notifier/p2p_notifier.cc
index b02d604629b18f2f06f97136c40a1f0d355d29ec..c72895e349190f080a281ed95f1be04d9c859180 100644
--- a/sync/notifier/p2p_notifier.cc
+++ b/sync/notifier/p2p_notifier.cc
@@ -64,7 +64,7 @@ P2PNotificationData::P2PNotificationData() : target_(NOTIFY_SELF) {}
P2PNotificationData::P2PNotificationData(
const std::string& sender_id,
P2PNotificationTarget target,
- syncable::ModelTypeSet changed_types)
+ syncer::ModelTypeSet changed_types)
: sender_id_(sender_id),
target_(target),
changed_types_(changed_types) {}
@@ -85,7 +85,7 @@ bool P2PNotificationData::IsTargeted(const std::string& id) const {
}
}
-syncable::ModelTypeSet P2PNotificationData::GetChangedTypes() const {
+syncer::ModelTypeSet P2PNotificationData::GetChangedTypes() const {
return changed_types_;
}
@@ -101,7 +101,7 @@ std::string P2PNotificationData::ToString() const {
dict->SetString(kSenderIdKey, sender_id_);
dict->SetString(kNotificationTypeKey,
P2PNotificationTargetToString(target_));
- dict->Set(kChangedTypesKey, syncable::ModelTypeSetToValue(changed_types_));
+ dict->Set(kChangedTypesKey, syncer::ModelTypeSetToValue(changed_types_));
std::string json;
base::JSONWriter::Write(dict.get(), &json);
return json;
@@ -136,7 +136,7 @@ bool P2PNotificationData::ResetFromString(const std::string& str) {
<< kChangedTypesKey;
return false;
}
- changed_types_ = syncable::ModelTypeSetFromValue(*changed_types_list);
+ changed_types_ = syncer::ModelTypeSetFromValue(*changed_types_list);
return true;
}
@@ -194,9 +194,9 @@ void P2PNotifier::UpdateCredentials(
}
void P2PNotifier::UpdateEnabledTypes(
- syncable::ModelTypeSet enabled_types) {
+ syncer::ModelTypeSet enabled_types) {
DCHECK(thread_checker_.CalledOnValidThread());
- const syncable::ModelTypeSet new_enabled_types =
+ const syncer::ModelTypeSet new_enabled_types =
Difference(enabled_types, enabled_types_);
enabled_types_ = enabled_types;
const P2PNotificationData notification_data(
@@ -205,7 +205,7 @@ void P2PNotifier::UpdateEnabledTypes(
}
void P2PNotifier::SendNotification(
- syncable::ModelTypeSet changed_types) {
+ syncer::ModelTypeSet changed_types) {
DCHECK(thread_checker_.CalledOnValidThread());
const P2PNotificationData notification_data(
unique_id_, send_notification_target_, changed_types);
@@ -266,8 +266,8 @@ void P2PNotifier::OnIncomingNotification(
DVLOG(1) << "No changed types -- not emitting notification";
return;
}
- const syncable::ModelTypePayloadMap& type_payloads =
- syncable::ModelTypePayloadMapFromEnumSet(
+ const syncer::ModelTypePayloadMap& type_payloads =
+ syncer::ModelTypePayloadMapFromEnumSet(
notification_data.GetChangedTypes(), std::string());
FOR_EACH_OBSERVER(SyncNotifierObserver, observer_list_,
OnIncomingNotification(type_payloads, REMOTE_NOTIFICATION));
« no previous file with comments | « sync/notifier/p2p_notifier.h ('k') | sync/notifier/p2p_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698