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

Side by Side Diff: chrome_frame/test/test_server.cc

Issue 3968001: Update code that previously constructed strings from string iterators only to... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 <windows.h> 5 #include <windows.h>
6 #include <objbase.h> 6 #include <objbase.h>
7 #include <urlmon.h> 7 #include <urlmon.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_number_conversions.h" 10 #include "base/string_number_conversions.h"
(...skipping 30 matching lines...) Expand all
41 tokenizer.token_end()); 41 tokenizer.token_end());
42 } 42 }
43 } 43 }
44 44
45 // Check for content-length in case we're being sent some data. 45 // Check for content-length in case we're being sent some data.
46 net::HttpUtil::HeadersIterator it(headers_.begin(), headers_.end(), 46 net::HttpUtil::HeadersIterator it(headers_.begin(), headers_.end(),
47 "\r\n"); 47 "\r\n");
48 while (it.GetNext()) { 48 while (it.GetNext()) {
49 if (LowerCaseEqualsASCII(it.name(), "content-length")) { 49 if (LowerCaseEqualsASCII(it.name(), "content-length")) {
50 int int_content_length; 50 int int_content_length;
51 base::StringToInt(it.values().c_str(), &int_content_length); 51 base::StringToInt(it.values().begin(),
52 it.values().end(),
53 &int_content_length);
52 content_length_ = int_content_length; 54 content_length_ = int_content_length;
53 break; 55 break;
54 } 56 }
55 } 57 }
56 } 58 }
57 59
58 void Request::OnDataReceived(const std::string& data) { 60 void Request::OnDataReceived(const std::string& data) {
59 content_ += data; 61 content_ += data;
60 62
61 if (method_.length() == 0) { 63 if (method_.length() == 0) {
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 data_.append(content_length_header); 367 data_.append(content_length_header);
366 data_.append("\r\n"); 368 data_.append("\r\n");
367 } 369 }
368 370
369 MessageLoop::current()->PostDelayedTask(FROM_HERE, 371 MessageLoop::current()->PostDelayedTask(FROM_HERE,
370 NewRunnableMethod(this, &ConfigurableConnection::SendChunk), 372 NewRunnableMethod(this, &ConfigurableConnection::SendChunk),
371 options.timeout_); 373 options.timeout_);
372 } 374 }
373 375
374 } // namespace test_server 376 } // namespace test_server
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698