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

Unified Diff: net/http/http_util.cc

Issue 1800003: Auto-format style pass over files. (Closed)
Patch Set: Remove trailing whitespace. Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_util.h ('k') | net/http/http_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.cc
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index 2ca8f02f439ffa2f04e658bee1989d2485259d50..8168102b68d5f620dbe1ce3f732f2ba2df469d50 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -112,15 +112,16 @@ void HttpUtil::ParseContentType(const string& content_type_str,
size_t cur_param_end =
FindDelimiter(content_type_str, cur_param_start, ';');
- size_t param_name_start = content_type_str.find_first_not_of(HTTP_LWS,
- cur_param_start);
+ size_t param_name_start = content_type_str.find_first_not_of(
+ HTTP_LWS, cur_param_start);
param_name_start = std::min(param_name_start, cur_param_end);
static const char charset_str[] = "charset=";
- size_t charset_end_offset = std::min(param_name_start +
- sizeof(charset_str) - 1, cur_param_end);
- if (LowerCaseEqualsASCII(content_type_str.begin() + param_name_start,
- content_type_str.begin() + charset_end_offset, charset_str)) {
+ size_t charset_end_offset = std::min(
+ param_name_start + sizeof(charset_str) - 1, cur_param_end);
+ if (LowerCaseEqualsASCII(
+ content_type_str.begin() + param_name_start,
+ content_type_str.begin() + charset_end_offset, charset_str)) {
charset_val = param_name_start + sizeof(charset_str) - 1;
charset_end = cur_param_end;
type_has_charset = true;
@@ -160,9 +161,9 @@ void HttpUtil::ParseContentType(const string& content_type_str,
content_type_str.find_first_of('/') != string::npos) {
// Common case here is that mime_type is empty
bool eq = !mime_type->empty() &&
- LowerCaseEqualsASCII(content_type_str.begin() + type_val,
- content_type_str.begin() + type_end,
- mime_type->data());
+ LowerCaseEqualsASCII(content_type_str.begin() + type_val,
+ content_type_str.begin() + type_end,
+ mime_type->data());
if (!eq) {
mime_type->assign(content_type_str.begin() + type_val,
content_type_str.begin() + type_end);
@@ -242,11 +243,11 @@ bool HttpUtil::ParseRangeHeader(const std::string& ranges_specifier,
HttpByteRange range;
// Try to obtain first-byte-pos.
if (!first_byte_pos.empty()) {
- int64 first_byte_position = -1;
- if (!StringToInt64(first_byte_pos, &first_byte_position))
- return false;
- range.set_first_byte_position(first_byte_position);
- }
+ int64 first_byte_position = -1;
+ if (!StringToInt64(first_byte_pos, &first_byte_position))
+ return false;
+ range.set_first_byte_position(first_byte_position);
+ }
std::string::const_iterator last_byte_pos_begin =
byte_range_set_iterator.value_begin() + minus_char_offset + 1;
« no previous file with comments | « net/http/http_util.h ('k') | net/http/http_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698