diff options
author | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 22:00:54 +0000 |
---|---|---|
committer | zea@chromium.org <zea@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-27 22:00:54 +0000 |
commit | b0bcdbfe4b1e64fc2d07ccf3963ffb9097d6afb9 (patch) | |
tree | ca0b75f7847692fd00183bafb5f9e3a1b81e3856 /chrome/test/sync | |
parent | c757aaea2a0eef2c4cad4925884281e2f7639cd3 (diff) | |
download | chromium_src-b0bcdbfe4b1e64fc2d07ccf3963ffb9097d6afb9.zip chromium_src-b0bcdbfe4b1e64fc2d07ccf3963ffb9097d6afb9.tar.gz chromium_src-b0bcdbfe4b1e64fc2d07ccf3963ffb9097d6afb9.tar.bz2 |
Recommit attempt for rev 72685.
[SYNC] Refactor SyncSourceInfo and add support in chrome invalidation client and syncer thread for passing a datatype-specific payload originating in the invalidation server and directed at the sync frontend server. Also fixes bug with last_sync_time and PostTimeToTypeHistogram, which would get hit when the unit tests were being run.
BUG=68572, 69558
TEST=unit
Review URL: http://codereview.chromium.org/6313018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72891 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/sync')
-rw-r--r-- | chrome/test/sync/engine/syncer_command_test.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/test/sync/engine/syncer_command_test.h b/chrome/test/sync/engine/syncer_command_test.h index 808d71e..85580d69 100644 --- a/chrome/test/sync/engine/syncer_command_test.h +++ b/chrome/test/sync/engine/syncer_command_test.h @@ -6,6 +6,8 @@ #define CHROME_TEST_SYNC_ENGINE_SYNCER_COMMAND_TEST_H_ #pragma once +#include <algorithm> +#include <string> #include <vector> #include "chrome/browser/sync/engine/model_safe_worker.h" @@ -82,13 +84,18 @@ class SyncerCommandTestWithParam : public testing::TestWithParam<T>, sessions::SyncSessionContext* context() const { return context_.get(); } sessions::SyncSession::Delegate* delegate() { return this; } ModelSafeWorkerRegistrar* registrar() { return this; } - // Lazily create a session. + // Lazily create a session requesting all datatypes. sessions::SyncSession* session() { if (!session_.get()) { std::vector<ModelSafeWorker*> workers; GetWorkers(&workers); + ModelSafeRoutingInfo routes = routing_info(); + sessions::TypePayloadMap types = + sessions::MakeTypePayloadMapFromRoutingInfo(routes, std::string()); session_.reset(new sessions::SyncSession(context(), delegate(), - sessions::SyncSourceInfo(), routing_info_, workers)); + sessions::SyncSourceInfo(sync_pb::GetUpdatesCallerInfo::UNKNOWN, + types), + routing_info_, workers)); } return session_.get(); } |