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

Unified Diff: third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
Index: third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc
diff --git a/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc b/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc
index 9ec0ecb0766d0d02b0758e1ebd47587fe1d9c197..ec1cd0adc485f534216319f53304aa13521d859d 100644
--- a/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc
+++ b/third_party/cacheinvalidation/src/google/cacheinvalidation/impl/protocol-handler.cc
@@ -181,7 +181,8 @@ bool ProtocolHandler::HandleIncomingMessage(const string& incoming_message,
}
bool ProtocolHandler::CheckServerToken(const string& server_token) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
const string& client_token = listener_->GetClientToken();
// If we do not have a client token yet, there is nothing to compare. The
@@ -211,7 +212,8 @@ void ProtocolHandler::SendInitializeMessage(
const string& nonce,
BatchingTask* batching_task,
const string& debug_string) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
if (application_client_id.client_type() != client_type_) {
// This condition is not fatal, but it probably represents a bug somewhere
@@ -237,7 +239,8 @@ void ProtocolHandler::SendInfoMessage(
ClientConfigP* client_config,
bool request_server_registration_summary,
BatchingTask* batching_task) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
// Simply store the message in pending_info_message_ and send it
// when the batching task runs.
@@ -270,7 +273,8 @@ void ProtocolHandler::SendRegistrations(
const vector<ObjectIdP>& object_ids,
RegistrationP::OpType reg_op_type,
BatchingTask* batching_task) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
for (size_t i = 0; i < object_ids.size(); ++i) {
batcher_.AddRegistration(object_ids[i], reg_op_type);
}
@@ -279,7 +283,8 @@ void ProtocolHandler::SendRegistrations(
void ProtocolHandler::SendInvalidationAck(const InvalidationP& invalidation,
BatchingTask* batching_task) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
// We could summarize acks if there are suppressing invalidations - we don't
// since it is unlikely to be too beneficial here.
batcher_.AddAck(invalidation);
@@ -289,7 +294,8 @@ void ProtocolHandler::SendInvalidationAck(const InvalidationP& invalidation,
void ProtocolHandler::SendRegistrationSyncSubtree(
const RegistrationSubtree& reg_subtree,
BatchingTask* batching_task) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
TLOG(logger_, INFO, "Adding subtree: %s",
ProtoHelpers::ToString(reg_subtree).c_str());
batcher_.AddRegSubtree(reg_subtree);
@@ -297,7 +303,8 @@ void ProtocolHandler::SendRegistrationSyncSubtree(
}
void ProtocolHandler::SendMessageToServer() {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
if (next_message_send_time_ms_ > GetCurrentTimeMs()) {
TLOG(logger_, WARNING, "In quiet period: not sending message to server: "
@@ -339,7 +346,8 @@ void ProtocolHandler::SendMessageToServer() {
}
void ProtocolHandler::InitClientHeader(ClientHeader* builder) {
- CHECK(internal_scheduler_->IsRunningOnThread()) << "Not on internal thread";
+ // Not on internal thread
+ CHECK(internal_scheduler_->IsRunningOnThread());
ProtoHelpers::InitProtocolVersion(builder->mutable_protocol_version());
builder->set_client_time_ms(GetCurrentTimeMs());
builder->set_message_id(StringPrintf("%d", message_id_));

Powered by Google App Engine
This is Rietveld 408576698