diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 16:05:47 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-22 16:05:47 +0000 |
commit | c2750c67ca3a672018bac2dfb07628d079aafc8d (patch) | |
tree | 8bbff1c4c3aeb363e06734e91e172653e34737cc /webkit/glue/multipart_response_delegate.cc | |
parent | 213b99ad9d66e3c039bbb90c19d78603975c1be9 (diff) | |
download | chromium_src-c2750c67ca3a672018bac2dfb07628d079aafc8d.zip chromium_src-c2750c67ca3a672018bac2dfb07628d079aafc8d.tar.gz chromium_src-c2750c67ca3a672018bac2dfb07628d079aafc8d.tar.bz2 |
Update code that previously constructed strings from string iterators only to use StringToInt. These usages now pass the iterators directly to the new StringToInt overloads.
BUG=None
TEST=All
Review URL: http://codereview.chromium.org/3968001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63515 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/multipart_response_delegate.cc')
-rw-r--r-- | webkit/glue/multipart_response_delegate.cc | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/webkit/glue/multipart_response_delegate.cc b/webkit/glue/multipart_response_delegate.cc index 4839a91..99a9e4c 100644 --- a/webkit/glue/multipart_response_delegate.cc +++ b/webkit/glue/multipart_response_delegate.cc @@ -342,12 +342,6 @@ bool MultipartResponseDelegate::ReadContentRanges( return false; } - size_t byte_range_lower_bound_characters = - byte_range_lower_bound_end_offset - byte_range_lower_bound_start_offset; - std::string byte_range_lower_bound = - content_range.substr(byte_range_lower_bound_start_offset, - byte_range_lower_bound_characters); - size_t byte_range_upper_bound_start_offset = byte_range_lower_bound_end_offset + 1; @@ -357,16 +351,16 @@ bool MultipartResponseDelegate::ReadContentRanges( return false; } - size_t byte_range_upper_bound_characters = - byte_range_upper_bound_end_offset - byte_range_upper_bound_start_offset; - - std::string byte_range_upper_bound = - content_range.substr(byte_range_upper_bound_start_offset, - byte_range_upper_bound_characters); - - if (!base::StringToInt(byte_range_lower_bound, content_range_lower_bound)) + if (!base::StringToInt( + content_range.begin() + byte_range_lower_bound_start_offset, + content_range.begin() + byte_range_lower_bound_end_offset, + content_range_lower_bound)) return false; - if (!base::StringToInt(byte_range_upper_bound, content_range_upper_bound)) + + if (!base::StringToInt( + content_range.begin() + byte_range_upper_bound_start_offset, + content_range.begin() + byte_range_upper_bound_end_offset, + content_range_upper_bound)) return false; return true; } |