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

Side by Side Diff: content/browser/tcmalloc_internals_request_job.cc

Issue 10855209: Refactoring: ProtocolHandler::MaybeCreateJob takes NetworkDelegate as argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: NetworkDelegate fixed almost everywhere Created 8 years, 4 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) 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 "content/browser/tcmalloc_internals_request_job.h" 5 #include "content/browser/tcmalloc_internals_request_job.h"
6 6
7 #include "base/allocator/allocator_extension.h" 7 #include "base/allocator/allocator_extension.h"
8 #include "content/common/child_process_messages.h" 8 #include "content/common/child_process_messages.h"
9 #include "content/public/browser/browser_child_process_host_iterator.h" 9 #include "content/public/browser/browser_child_process_host_iterator.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "content/public/browser/render_process_host.h" 11 #include "content/public/browser/render_process_host.h"
12 #include "content/public/common/process_type.h" 12 #include "content/public/common/process_type.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "net/url_request/url_request.h"
mmenke 2012/08/21 15:28:49 Why is this needed?
shalev 2012/08/22 20:34:10 Done.
14 15
15 namespace content { 16 namespace content {
16 17
17 // static 18 // static
18 AboutTcmallocOutputs* AboutTcmallocOutputs::GetInstance() { 19 AboutTcmallocOutputs* AboutTcmallocOutputs::GetInstance() {
19 return Singleton<AboutTcmallocOutputs>::get(); 20 return Singleton<AboutTcmallocOutputs>::get();
20 } 21 }
21 22
22 AboutTcmallocOutputs::AboutTcmallocOutputs() {} 23 AboutTcmallocOutputs::AboutTcmallocOutputs() {}
23 24
(...skipping 26 matching lines...) Expand all
50 data->append("</td></tr>\n"); 51 data->append("</td></tr>\n");
51 data->append("<tr><td><pre>\n"); 52 data->append("<tr><td><pre>\n");
52 data->append(oit->second); 53 data->append(oit->second);
53 data->append("</pre></td></tr>\n"); 54 data->append("</pre></td></tr>\n");
54 } 55 }
55 data->append("</table>\n"); 56 data->append("</table>\n");
56 outputs_.clear(); 57 outputs_.clear();
57 } 58 }
58 59
59 TcmallocInternalsRequestJob::TcmallocInternalsRequestJob( 60 TcmallocInternalsRequestJob::TcmallocInternalsRequestJob(
60 net::URLRequest* request) : net::URLRequestSimpleJob(request) { 61 net::URLRequest* request, net::NetworkDelegate* network_delegate)
62 : net::URLRequestSimpleJob(request, network_delegate) {
61 } 63 }
62 64
63 #if defined(USE_TCMALLOC) 65 #if defined(USE_TCMALLOC)
64 void RequestTcmallocStatsFromChildRenderProcesses() { 66 void RequestTcmallocStatsFromChildRenderProcesses() {
65 RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator()); 67 RenderProcessHost::iterator it(RenderProcessHost::AllHostsIterator());
66 while (!it.IsAtEnd()) { 68 while (!it.IsAtEnd()) {
67 it.GetCurrentValue()->Send(new ChildProcessMsg_GetTcmallocStats); 69 it.GetCurrentValue()->Send(new ChildProcessMsg_GetTcmallocStats);
68 it.Advance(); 70 it.Advance();
69 } 71 }
70 } 72 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 charset->assign("UTF8"); 113 charset->assign("UTF8");
112 114
113 data->clear(); 115 data->clear();
114 #if defined(USE_TCMALLOC) 116 #if defined(USE_TCMALLOC)
115 AboutTcmalloc(data); 117 AboutTcmalloc(data);
116 #endif 118 #endif
117 return net::OK; 119 return net::OK;
118 } 120 }
119 121
120 } // namespace content 122 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698