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

Side by Side Diff: net/tools/quic/quic_spdy_server_stream.cc

Issue 137253006: Silence INFO logging in net/tools/quic/ and use VLOG(1) instead. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/spdy_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/quic_spdy_server_stream.h" 5 #include "net/tools/quic/quic_spdy_server_stream.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "net/quic/quic_session.h" 8 #include "net/quic/quic_session.h"
9 #include "net/spdy/spdy_framer.h" 9 #include "net/spdy/spdy_framer.h"
10 #include "net/tools/quic/quic_in_memory_cache.h" 10 #include "net/tools/quic/quic_in_memory_cache.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 void QuicSpdyServerStream::SendResponse() { 91 void QuicSpdyServerStream::SendResponse() {
92 // Find response in cache. If not found, send error response. 92 // Find response in cache. If not found, send error response.
93 const QuicInMemoryCache::Response* response = 93 const QuicInMemoryCache::Response* response =
94 QuicInMemoryCache::GetInstance()->GetResponse(headers_); 94 QuicInMemoryCache::GetInstance()->GetResponse(headers_);
95 if (response == NULL) { 95 if (response == NULL) {
96 SendErrorResponse(); 96 SendErrorResponse();
97 return; 97 return;
98 } 98 }
99 99
100 DLOG(INFO) << "Sending response for stream " << id(); 100 DVLOG(1) << "Sending response for stream " << id();
101 SendHeadersAndBody(response->headers(), response->body()); 101 SendHeadersAndBody(response->headers(), response->body());
102 } 102 }
103 103
104 void QuicSpdyServerStream::SendErrorResponse() { 104 void QuicSpdyServerStream::SendErrorResponse() {
105 DLOG(INFO) << "Sending error response for stream " << id(); 105 DVLOG(1) << "Sending error response for stream " << id();
106 BalsaHeaders headers; 106 BalsaHeaders headers;
107 headers.SetResponseFirstlineFromStringPieces( 107 headers.SetResponseFirstlineFromStringPieces(
108 "HTTP/1.1", "500", "Server Error"); 108 "HTTP/1.1", "500", "Server Error");
109 headers.ReplaceOrAppendHeader("content-length", "3"); 109 headers.ReplaceOrAppendHeader("content-length", "3");
110 SendHeadersAndBody(headers, "bad"); 110 SendHeadersAndBody(headers, "bad");
111 } 111 }
112 112
113 void QuicSpdyServerStream:: SendHeadersAndBody( 113 void QuicSpdyServerStream:: SendHeadersAndBody(
114 const BalsaHeaders& response_headers, 114 const BalsaHeaders& response_headers,
115 StringPiece body) { 115 StringPiece body) {
(...skipping 13 matching lines...) Expand all
129 WriteOrBufferData(headers_string, body.empty()); 129 WriteOrBufferData(headers_string, body.empty());
130 } 130 }
131 131
132 if (!body.empty()) { 132 if (!body.empty()) {
133 WriteOrBufferData(body, true); 133 WriteOrBufferData(body, true);
134 } 134 }
135 } 135 }
136 136
137 } // namespace tools 137 } // namespace tools
138 } // namespace net 138 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_spdy_client_stream.cc ('k') | net/tools/quic/spdy_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698