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

Unified Diff: sync/test/engine/mock_update_handler.cc

Issue 161253002: sync: Add interfaces for per-type sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another win compile fix Created 6 years, 10 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/test/engine/mock_update_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/engine/mock_update_handler.cc
diff --git a/sync/test/engine/mock_update_handler.cc b/sync/test/engine/mock_update_handler.cc
new file mode 100644
index 0000000000000000000000000000000000000000..41c6d2919aff8955eb4ec07064d393452dadd129
--- /dev/null
+++ b/sync/test/engine/mock_update_handler.cc
@@ -0,0 +1,37 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "sync/test/engine/mock_update_handler.h"
+
+#include "sync/internal_api/public/base/model_type.h"
+
+namespace syncer {
+
+MockUpdateHandler::MockUpdateHandler(ModelType type) {
+ progress_marker_.set_data_type_id(GetSpecificsFieldNumberFromModelType(type));
+ const std::string& token_str =
+ std::string("Mock token: ") + std::string(ModelTypeToString(type));
+ progress_marker_.set_token(token_str);
+}
+
+MockUpdateHandler::~MockUpdateHandler() {}
+
+void MockUpdateHandler::GetDownloadProgress(
+ sync_pb::DataTypeProgressMarker* progress_marker) const {
+ progress_marker->CopyFrom(progress_marker_);
+}
+
+void MockUpdateHandler::ProcessGetUpdatesResponse(
+ const sync_pb::DataTypeProgressMarker& progress_marker,
+ const SyncEntityList& applicable_updates,
+ sessions::StatusController* status) {
+ progress_marker_.CopyFrom(progress_marker);
+}
+
+void MockUpdateHandler::ApplyUpdates(sessions::StatusController* status) {}
+
+void MockUpdateHandler::PassiveApplyUpdates(
+ sessions::StatusController* status) {}
+
+} // namespace syncer
« no previous file with comments | « sync/test/engine/mock_update_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698