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

Unified Diff: sync/engine/download_updates_command.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
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | sync/engine/download_updates_command_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/download_updates_command.cc
diff --git a/sync/engine/download_updates_command.cc b/sync/engine/download_updates_command.cc
index 65677fb23a9ed90dce284b787baf19f5221b3f34..0c413b67844251930c2470eeeb074bad6ccc029b 100644
--- a/sync/engine/download_updates_command.cc
+++ b/sync/engine/download_updates_command.cc
@@ -9,7 +9,7 @@
#include "base/command_line.h"
#include "sync/engine/syncer.h"
#include "sync/engine/syncer_proto_util.h"
-#include "sync/internal_api/public/base/model_type_payload_map.h"
+#include "sync/internal_api/public/base/model_type_state_map.h"
#include "sync/syncable/directory.h"
#include "sync/syncable/read_transaction.h"
@@ -71,7 +71,7 @@ SyncerError DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
<< ModelTypeSetToString(enabled_types);
DCHECK(!enabled_types.Empty());
- const ModelTypePayloadMap& type_payload_map = session->source().types;
+ const ModelTypeStateMap& type_state_map = session->source().types;
for (ModelTypeSet::Iterator it = enabled_types.First();
it.Good(); it.Inc()) {
sync_pb::DataTypeProgressMarker* progress_marker =
@@ -79,10 +79,10 @@ SyncerError DownloadUpdatesCommand::ExecuteImpl(SyncSession* session) {
dir->GetDownloadProgress(it.Get(), progress_marker);
// Set notification hint if present.
- ModelTypePayloadMap::const_iterator type_payload =
- type_payload_map.find(it.Get());
- if (type_payload != type_payload_map.end()) {
- progress_marker->set_notification_hint(type_payload->second);
+ ModelTypeStateMap::const_iterator type_state =
+ type_state_map.find(it.Get());
+ if (type_state != type_state_map.end()) {
+ progress_marker->set_notification_hint(type_state->second.payload);
}
}
« no previous file with comments | « chrome/browser/sync/test_profile_sync_service.cc ('k') | sync/engine/download_updates_command_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698