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

Side by Side Diff: net/spdy/spdy_http_utils.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_session_spdy2_unittest.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/spdy/spdy_http_utils.h" 5 #include "net/spdy/spdy_http_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 it = headers.find(scheme_header); 181 it = headers.find(scheme_header);
182 if (it != headers.end()) 182 if (it != headers.end())
183 scheme = it->second; 183 scheme = it->second;
184 it = headers.find(host_header); 184 it = headers.find(host_header);
185 if (it != headers.end()) 185 if (it != headers.end())
186 host_port = it->second; 186 host_port = it->second;
187 it = headers.find(path_header); 187 it = headers.find(path_header);
188 if (it != headers.end()) 188 if (it != headers.end())
189 path = it->second; 189 path = it->second;
190 190
191 std::string url = (scheme.empty() || host_port.empty() || path.empty()) 191 std::string url = (scheme.empty() || host_port.empty() || path.empty())
192 ? "" : scheme + "://" + host_port + path; 192 ? std::string()
193 : scheme + "://" + host_port + path;
193 return GURL(url); 194 return GURL(url);
194 } 195 }
195 196
196 bool ShouldShowHttpHeaderValue(const std::string& header_name) { 197 bool ShouldShowHttpHeaderValue(const std::string& header_name) {
197 #if defined(SPDY_PROXY_AUTH_ORIGIN) 198 #if defined(SPDY_PROXY_AUTH_ORIGIN)
198 if (header_name == "proxy-authorization") 199 if (header_name == "proxy-authorization")
199 return false; 200 return false;
200 #endif 201 #endif
201 return true; 202 return true;
202 } 203 }
203 204
204 } // namespace net 205 } // namespace net
OLDNEW
« no previous file with comments | « net/spdy/spdy_framer_test.cc ('k') | net/spdy/spdy_session_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698