diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 04:29:44 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-24 04:29:44 +0000 |
commit | bd6007ea79376728e7096a3261e812908933ba85 (patch) | |
tree | a794320cf3d5a922c7af84f965c5f6a30624cf4e /sync/test | |
parent | 3e59af452cc296f22e14ee738594fec9cee38e7c (diff) | |
download | chromium_src-bd6007ea79376728e7096a3261e812908933ba85.zip chromium_src-bd6007ea79376728e7096a3261e812908933ba85.tar.gz chromium_src-bd6007ea79376728e7096a3261e812908933ba85.tar.bz2 |
Refactor ModelTypePayloadMap and ObjectIdPayloadMap to StateMaps.
This lays the groundwork for allowing us to pass ack handles for object IDs to
SyncNotifierObservers.
BUG=124149
TEST=none, there should be no behavior change.
Review URL: https://chromiumcodereview.appspot.com/10837214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sync/test')
-rw-r--r-- | sync/test/engine/fake_sync_scheduler.cc | 4 | ||||
-rw-r--r-- | sync/test/engine/fake_sync_scheduler.h | 4 | ||||
-rw-r--r-- | sync/test/engine/mock_connection_manager.cc | 4 | ||||
-rw-r--r-- | sync/test/engine/mock_connection_manager.h | 8 | ||||
-rw-r--r-- | sync/test/engine/syncer_command_test.h | 6 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sync/test/engine/fake_sync_scheduler.cc b/sync/test/engine/fake_sync_scheduler.cc index 2327949..fee1595 100644 --- a/sync/test/engine/fake_sync_scheduler.cc +++ b/sync/test/engine/fake_sync_scheduler.cc @@ -25,9 +25,9 @@ void FakeSyncScheduler::ScheduleNudgeAsync( const tracked_objects::Location& nudge_location) { } -void FakeSyncScheduler::ScheduleNudgeWithPayloadsAsync( +void FakeSyncScheduler::ScheduleNudgeWithStatesAsync( const base::TimeDelta& delay, NudgeSource source, - const ModelTypePayloadMap& types_with_payloads, + const ModelTypeStateMap& types_with_payloads, const tracked_objects::Location& nudge_location) { } diff --git a/sync/test/engine/fake_sync_scheduler.h b/sync/test/engine/fake_sync_scheduler.h index 4c2fbba..40ebd41 100644 --- a/sync/test/engine/fake_sync_scheduler.h +++ b/sync/test/engine/fake_sync_scheduler.h @@ -26,9 +26,9 @@ class FakeSyncScheduler : public SyncScheduler { NudgeSource source, ModelTypeSet types, const tracked_objects::Location& nudge_location) OVERRIDE; - virtual void ScheduleNudgeWithPayloadsAsync( + virtual void ScheduleNudgeWithStatesAsync( const base::TimeDelta& delay, NudgeSource source, - const ModelTypePayloadMap& types_with_payloads, + const ModelTypeStateMap& type_state_map, const tracked_objects::Location& nudge_location) OVERRIDE; virtual bool ScheduleConfiguration( const ConfigurationParams& params) OVERRIDE; diff --git a/sync/test/engine/mock_connection_manager.cc b/sync/test/engine/mock_connection_manager.cc index 3739bf3..0d4041b 100644 --- a/sync/test/engine/mock_connection_manager.cc +++ b/sync/test/engine/mock_connection_manager.cc @@ -408,8 +408,8 @@ void MockConnectionManager::ProcessGetUpdates( EXPECT_EQ(expected_filter_.Has(model_type), (progress_marker != NULL)) << "Syncer requested_types differs from test expectation."; if (progress_marker) { - EXPECT_EQ((expected_payloads_.count(model_type) > 0 ? - expected_payloads_[model_type] : + EXPECT_EQ((expected_states_.count(model_type) > 0 ? + expected_states_[model_type].payload : std::string()), progress_marker->notification_hint()); } diff --git a/sync/test/engine/mock_connection_manager.h b/sync/test/engine/mock_connection_manager.h index 5aabe7f..7c5271c 100644 --- a/sync/test/engine/mock_connection_manager.h +++ b/sync/test/engine/mock_connection_manager.h @@ -17,7 +17,7 @@ #include "base/memory/scoped_vector.h" #include "sync/engine/net/server_connection_manager.h" #include "sync/internal_api/public/base/model_type.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/protocol/sync.pb.h" namespace syncer { @@ -188,8 +188,8 @@ class MockConnectionManager : public ServerConnectionManager { expected_filter_ = expected_filter; } - void ExpectGetUpdatesRequestPayloads(const ModelTypePayloadMap& payloads) { - expected_payloads_ = payloads; + void ExpectGetUpdatesRequestStates(const ModelTypeStateMap& states) { + expected_states_ = states; } void SetServerReachable(); @@ -338,7 +338,7 @@ class MockConnectionManager : public ServerConnectionManager { ModelTypeSet expected_filter_; - ModelTypePayloadMap expected_payloads_; + ModelTypeStateMap expected_states_; int num_get_updates_requests_; diff --git a/sync/test/engine/syncer_command_test.h b/sync/test/engine/syncer_command_test.h index 803ef18..8e1aa14 100644 --- a/sync/test/engine/syncer_command_test.h +++ b/sync/test/engine/syncer_command_test.h @@ -98,10 +98,10 @@ class SyncerCommandTestBase : public testing::Test, sessions::SyncSessionContext* context() const { return context_.get(); } sessions::SyncSession::Delegate* delegate() { return this; } - // Lazily create a session requesting all datatypes with no payload. + // Lazily create a session requesting all datatypes with no state. sessions::SyncSession* session() { - ModelTypePayloadMap types = - ModelSafeRoutingInfoToPayloadMap(routing_info_, std::string()); + ModelTypeStateMap types = + ModelSafeRoutingInfoToStateMap(routing_info_, std::string()); return session(sessions::SyncSourceInfo(types)); } |