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

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

Issue 368001: Second patch in making destructors of refcounted objects private. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 static StatsCounter requests("FetchClient.requests"); 100 static StatsCounter requests("FetchClient.requests");
101 requests.Increment(); 101 requests.Increment();
102 driver_->ClientStopped(); 102 driver_->ClientStopped();
103 printf("."); 103 printf(".");
104 } 104 }
105 105
106 static const int kBufferSize = (16 * 1024); 106 static const int kBufferSize = (16 * 1024);
107 GURL url_; 107 GURL url_;
108 net::HttpRequestInfo request_info_; 108 net::HttpRequestInfo request_info_;
109 scoped_ptr<net::HttpTransaction> transaction_; 109 scoped_ptr<net::HttpTransaction> transaction_;
110 scoped_ptr<net::IOBuffer> buffer_; 110 scoped_refptr<net::IOBuffer> buffer_;
eroman 2009/11/05 20:52:19 good spot!
111 net::CompletionCallbackImpl<Client> connect_callback_; 111 net::CompletionCallbackImpl<Client> connect_callback_;
112 net::CompletionCallbackImpl<Client> read_callback_; 112 net::CompletionCallbackImpl<Client> read_callback_;
113 Singleton<Driver> driver_; 113 Singleton<Driver> driver_;
114 }; 114 };
115 115
116 int main(int argc, char**argv) { 116 int main(int argc, char**argv) {
117 base::AtExitManager exit; 117 base::AtExitManager exit;
118 StatsTable table("fetchclient", 50, 1000); 118 StatsTable table("fetchclient", 50, 1000);
119 table.set_current(&table); 119 table.set_current(&table);
120 120
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 std::string name(table.GetRowName(index)); 192 std::string name(table.GetRowName(index));
193 if (name.length() > 0) { 193 if (name.length() > 0) {
194 int value = table.GetRowValue(index); 194 int value = table.GetRowValue(index);
195 printf("%s:\t%d\n", name.c_str(), value); 195 printf("%s:\t%d\n", name.c_str(), value);
196 } 196 }
197 } 197 }
198 printf("</stats>\n"); 198 printf("</stats>\n");
199 } 199 }
200 return 0; 200 return 0;
201 } 201 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698