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

Unified Diff: net/spdy/spdy_session.cc

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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 | « mojo/system/dispatcher.cc ('k') | net/spdy/spdy_write_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 3ba558a7f19ad9f1756cc43032b5e4f039a5b37c..ad28cf7790f3a54fbe19c8d3693a5cb11c972e74 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -756,17 +756,17 @@ void SpdySession::CancelStreamRequest(
CHECK_GE(priority, MINIMUM_PRIORITY);
CHECK_LE(priority, MAXIMUM_PRIORITY);
- if (DCHECK_IS_ON()) {
- // |request| should not be in a queue not matching its priority.
- for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
- if (priority == i)
- continue;
- PendingStreamRequestQueue* queue = &pending_create_stream_queues_[i];
- DCHECK(std::find_if(queue->begin(),
- queue->end(),
- RequestEquals(request)) == queue->end());
- }
+#if DCHECK_IS_ON
+ // |request| should not be in a queue not matching its priority.
+ for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
+ if (priority == i)
+ continue;
+ PendingStreamRequestQueue* queue = &pending_create_stream_queues_[i];
+ DCHECK(std::find_if(queue->begin(),
+ queue->end(),
+ RequestEquals(request)) == queue->end());
}
+#endif
PendingStreamRequestQueue* queue =
&pending_create_stream_queues_[priority];
@@ -1459,13 +1459,13 @@ int SpdySession::DoWriteComplete(int result) {
}
void SpdySession::DcheckGoingAway() const {
+#if DCHECK_IS_ON
DCHECK_GE(availability_state_, STATE_GOING_AWAY);
- if (DCHECK_IS_ON()) {
- for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
- DCHECK(pending_create_stream_queues_[i].empty());
- }
+ for (int i = MINIMUM_PRIORITY; i <= MAXIMUM_PRIORITY; ++i) {
+ DCHECK(pending_create_stream_queues_[i].empty());
}
DCHECK(created_streams_.empty());
+#endif
}
void SpdySession::DcheckClosed() const {
@@ -3014,8 +3014,9 @@ void SpdySession::ResumeSendStalledStreams() {
while (availability_state_ != STATE_CLOSED && !IsSendStalled()) {
size_t old_size = 0;
- if (DCHECK_IS_ON())
- old_size = GetTotalSize(stream_send_unstall_queue_);
+#if DCHECK_IS_ON
+ old_size = GetTotalSize(stream_send_unstall_queue_);
+#endif
SpdyStreamId stream_id = PopStreamToPossiblyResume();
if (stream_id == 0)
« no previous file with comments | « mojo/system/dispatcher.cc ('k') | net/spdy/spdy_write_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698