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

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

Issue 9838058: More non-debug logging in Chrome Frame tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright and formatting tweaks Created 8 years, 9 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 | « chrome_frame/test/simulate_input.cc ('k') | chrome_frame/test/test_with_web_server.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 <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/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 } 316 }
317 } 317 }
318 } 318 }
319 319
320 void ConfigurableConnection::SendChunk() { 320 void ConfigurableConnection::SendChunk() {
321 int size = (int)data_.size(); 321 int size = (int)data_.size();
322 const char* chunk_ptr = data_.c_str() + cur_pos_; 322 const char* chunk_ptr = data_.c_str() + cur_pos_;
323 int bytes_to_send = std::min(options_.chunk_size_, size - cur_pos_); 323 int bytes_to_send = std::min(options_.chunk_size_, size - cur_pos_);
324 324
325 socket_->Send(chunk_ptr, bytes_to_send); 325 socket_->Send(chunk_ptr, bytes_to_send);
326 DVLOG(1) << "Sent(" << cur_pos_ << "," << bytes_to_send << "): " 326 VLOG(1) << "Sent(" << cur_pos_ << "," << bytes_to_send << "): "
327 << base::StringPiece(chunk_ptr, bytes_to_send); 327 << base::StringPiece(chunk_ptr, bytes_to_send);
328 328
329 cur_pos_ += bytes_to_send; 329 cur_pos_ += bytes_to_send;
330 if (cur_pos_ < size) { 330 if (cur_pos_ < size) {
331 MessageLoop::current()->PostDelayedTask( 331 MessageLoop::current()->PostDelayedTask(
332 FROM_HERE, base::Bind(&ConfigurableConnection::SendChunk, this), 332 FROM_HERE, base::Bind(&ConfigurableConnection::SendChunk, this),
333 options_.timeout_); 333 options_.timeout_);
334 } else { 334 } else {
335 socket_ = 0; // close the connection. 335 socket_ = 0; // close the connection.
336 } 336 }
337 } 337 }
(...skipping 21 matching lines...) Expand all
359 socket_->Send(headers); 359 socket_->Send(headers);
360 socket_->Send(content_length_header, true); 360 socket_->Send(content_length_header, true);
361 socket_->Send(content); 361 socket_->Send(content);
362 socket_ = 0; // close the connection. 362 socket_ = 0; // close the connection.
363 return; 363 return;
364 } 364 }
365 365
366 if (options_.speed_ == SendOptions::IMMEDIATE_HEADERS_DELAYED_CONTENT) { 366 if (options_.speed_ == SendOptions::IMMEDIATE_HEADERS_DELAYED_CONTENT) {
367 socket_->Send(headers); 367 socket_->Send(headers);
368 socket_->Send(content_length_header, true); 368 socket_->Send(content_length_header, true);
369 DVLOG(1) << "Headers sent: " << headers << content_length_header; 369 VLOG(1) << "Headers sent: " << headers << content_length_header;
370 data_.append(content); 370 data_.append(content);
371 } 371 }
372 372
373 if (options_.speed_ == SendOptions::DELAYED) { 373 if (options_.speed_ == SendOptions::DELAYED) {
374 data_ = headers; 374 data_ = headers;
375 data_.append(content_length_header); 375 data_.append(content_length_header);
376 data_.append("\r\n"); 376 data_.append("\r\n");
377 } 377 }
378 378
379 MessageLoop::current()->PostDelayedTask( 379 MessageLoop::current()->PostDelayedTask(
380 FROM_HERE, base::Bind(&ConfigurableConnection::SendChunk, this), 380 FROM_HERE, base::Bind(&ConfigurableConnection::SendChunk, this),
381 options.timeout_); 381 options.timeout_);
382 } 382 }
383 383
384 } // namespace test_server 384 } // namespace test_server
OLDNEW
« no previous file with comments | « chrome_frame/test/simulate_input.cc ('k') | chrome_frame/test/test_with_web_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698