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

Unified Diff: sync/test/fake_server/fake_server.cc

Issue 327593003: Sync FakeServer cleanup: CHECKs and logging info (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | sync/test/fake_server/fake_server_entity.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/test/fake_server/fake_server.cc
diff --git a/sync/test/fake_server/fake_server.cc b/sync/test/fake_server/fake_server.cc
index 25ec36ae1c38a2a4b2b4873a0557238c04fadcea..d881080632c85cd2034c1e462cfafd1071c231a5 100644
--- a/sync/test/fake_server/fake_server.cc
+++ b/sync/test/fake_server/fake_server.cc
@@ -115,7 +115,8 @@ class UpdateSieve {
scoped_ptr<UpdateSieve> UpdateSieve::Create(
const sync_pb::GetUpdatesMessage& get_updates_message) {
- DCHECK_GT(get_updates_message.from_progress_marker_size(), 0);
+ CHECK_GT(get_updates_message.from_progress_marker_size(), 0)
+ << "A GetUpdates request must have at least one progress marker.";
UpdateSieve::ModelTypeToVersionMap request_from_version;
int64 min_version = std::numeric_limits<int64>::max();
@@ -128,7 +129,7 @@ scoped_ptr<UpdateSieve> UpdateSieve::Create(
// first request for this type).
if (marker.has_token() && !marker.token().empty()) {
bool parsed = base::StringToInt64(marker.token(), &version);
- DCHECK(parsed);
+ CHECK(parsed) << "Unable to parse progress marker token.";
}
ModelType model_type = syncer::GetModelTypeFromSpecificsFieldNumber(
@@ -223,7 +224,7 @@ void FakeServer::HandleCommand(const string& request,
sync_pb::ClientToServerMessage message;
bool parsed = message.ParseFromString(request);
- DCHECK(parsed);
+ CHECK(parsed) << "Unable to parse the ClientToServerMessage.";
sync_pb::SyncEnums_ErrorType error_code;
sync_pb::ClientToServerResponse response_proto;
« no previous file with comments | « no previous file | sync/test/fake_server/fake_server_entity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698