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

Unified Diff: chrome/browser/sync/glue/chrome_sync_notification_bridge.cc

Issue 10837214: Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test Created 8 years, 4 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
Index: chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
diff --git a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
index 038d4f2b0f3bcd04066b81f6f01b444257b19685..dfd3e1f96a2ea6912f2034d4c561594631a30ee2 100644
--- a/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
+++ b/chrome/browser/sync/glue/chrome_sync_notification_bridge.cc
@@ -37,7 +37,7 @@ class ChromeSyncNotificationBridge::Core
void UnregisterHandler(syncer::SyncNotifierObserver* handler);
void EmitNotification(
- const syncer::ModelTypePayloadMap& payload_map,
+ const syncer::ModelTypeStateMap& state_map,
syncer::IncomingNotificationSource notification_source);
private:
@@ -100,16 +100,16 @@ void ChromeSyncNotificationBridge::Core::UnregisterHandler(
}
void ChromeSyncNotificationBridge::Core::EmitNotification(
- const syncer::ModelTypePayloadMap& payload_map,
+ const syncer::ModelTypeStateMap& state_map,
syncer::IncomingNotificationSource notification_source) {
DCHECK(sync_task_runner_->RunsTasksOnCurrentThread());
- const syncer::ModelTypePayloadMap& effective_payload_map =
- payload_map.empty() ?
- syncer::ModelTypePayloadMapFromEnumSet(enabled_types_, std::string()) :
- payload_map;
+ const syncer::ModelTypeStateMap& effective_state_map =
+ state_map.empty() ?
+ syncer::ModelTypeSetToStateMap(enabled_types_, std::string()) :
+ state_map;
notifier_registrar_->DispatchInvalidationsToHandlers(
- ModelTypePayloadMapToObjectIdPayloadMap(effective_payload_map),
+ ModelTypeStateMapToObjectIdStateMap(effective_state_map),
notification_source);
}
@@ -181,13 +181,13 @@ void ChromeSyncNotificationBridge::Observe(
return;
}
- content::Details<const syncer::ModelTypePayloadMap>
- payload_details(details);
- const syncer::ModelTypePayloadMap& payload_map = *(payload_details.ptr());
+ content::Details<const syncer::ModelTypeStateMap>
+ state_details(details);
+ const syncer::ModelTypeStateMap& state_map = *(state_details.ptr());
if (!sync_task_runner_->PostTask(
FROM_HERE,
base::Bind(&Core::EmitNotification,
- core_, payload_map, notification_source))) {
+ core_, state_map, notification_source))) {
NOTREACHED();
}
}

Powered by Google App Engine
This is Rietveld 408576698