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

Side by Side Diff: net/tools/fetch/fetch_client.cc

Issue 1783008: Cleanup: Remove the implicit constructor for BoundNetLog that allowed passing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Sync Created 10 years, 7 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 | « net/spdy/spdy_stream_unittest.cc ('k') | net/tools/hresolv/hresolv.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) 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/singleton.h" 10 #include "base/singleton.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 connect_callback_(this, &Client::OnConnectComplete)), 56 connect_callback_(this, &Client::OnConnectComplete)),
57 ALLOW_THIS_IN_INITIALIZER_LIST( 57 ALLOW_THIS_IN_INITIALIZER_LIST(
58 read_callback_(this, &Client::OnReadComplete)) { 58 read_callback_(this, &Client::OnReadComplete)) {
59 int rv = factory->CreateTransaction(&transaction_); 59 int rv = factory->CreateTransaction(&transaction_);
60 DCHECK_EQ(net::OK, rv); 60 DCHECK_EQ(net::OK, rv);
61 buffer_->AddRef(); 61 buffer_->AddRef();
62 driver_->ClientStarted(); 62 driver_->ClientStarted();
63 request_info_.url = url_; 63 request_info_.url = url_;
64 request_info_.method = "GET"; 64 request_info_.method = "GET";
65 int state = transaction_->Start( 65 int state = transaction_->Start(
66 &request_info_, &connect_callback_, NULL); 66 &request_info_, &connect_callback_, net::BoundNetLog());
67 DCHECK(state == net::ERR_IO_PENDING); 67 DCHECK(state == net::ERR_IO_PENDING);
68 }; 68 };
69 69
70 private: 70 private:
71 void OnConnectComplete(int result) { 71 void OnConnectComplete(int result) {
72 // Do work here. 72 // Do work here.
73 int state = transaction_->Read(buffer_.get(), kBufferSize, &read_callback_); 73 int state = transaction_->Read(buffer_.get(), kBufferSize, &read_callback_);
74 if (state == net::ERR_IO_PENDING) 74 if (state == net::ERR_IO_PENDING)
75 return; // IO has started. 75 return; // IO has started.
76 if (state < 0) 76 if (state < 0)
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 std::string name(table.GetRowName(index)); 195 std::string name(table.GetRowName(index));
196 if (name.length() > 0) { 196 if (name.length() > 0) {
197 int value = table.GetRowValue(index); 197 int value = table.GetRowValue(index);
198 printf("%s:\t%d\n", name.c_str(), value); 198 printf("%s:\t%d\n", name.c_str(), value);
199 } 199 }
200 } 200 }
201 printf("</stats>\n"); 201 printf("</stats>\n");
202 } 202 }
203 return 0; 203 return 0;
204 } 204 }
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/tools/hresolv/hresolv.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698