summaryrefslogtreecommitdiffstats
path: root/net/http/http_util.cc
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 15:36:11 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-04 15:36:11 +0000
commit2227c699c409af182b20d64fae135217d9ab6a24 (patch)
tree02181ac8440b73d460a67ce216ffef7bad85ff2c /net/http/http_util.cc
parent4f5c54c25a07c7ea62af278b8a455b539273b8e1 (diff)
downloadchromium_src-2227c699c409af182b20d64fae135217d9ab6a24.zip
chromium_src-2227c699c409af182b20d64fae135217d9ab6a24.tar.gz
chromium_src-2227c699c409af182b20d64fae135217d9ab6a24.tar.bz2
Auto-format style pass over files.
This is a refactor (actually reformat) only - no behavior change in place. BUG=NONE TEST=net_unittests.exe Review URL: http://codereview.chromium.org/1800003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_util.cc')
-rw-r--r--net/http/http_util.cc29
1 files changed, 15 insertions, 14 deletions
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index 2ca8f02..8168102 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;