OLD | NEW |
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 "base/profiler/scoped_tracker.h" | |
9 #include "content/common/child_process_messages.h" | 8 #include "content/common/child_process_messages.h" |
10 #include "content/public/browser/browser_child_process_host_iterator.h" | 9 #include "content/public/browser/browser_child_process_host_iterator.h" |
11 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
12 #include "content/public/browser/render_process_host.h" | 11 #include "content/public/browser/render_process_host.h" |
13 #include "content/public/common/process_type.h" | 12 #include "content/public/common/process_type.h" |
14 #include "net/base/net_errors.h" | 13 #include "net/base/net_errors.h" |
15 | 14 |
16 namespace content { | 15 namespace content { |
17 | 16 |
18 // static | 17 // static |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( | 101 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( |
103 &RequestTcmallocStatsFromChildRenderProcesses)); | 102 &RequestTcmallocStatsFromChildRenderProcesses)); |
104 } | 103 } |
105 #endif | 104 #endif |
106 | 105 |
107 int TcmallocInternalsRequestJob::GetData( | 106 int TcmallocInternalsRequestJob::GetData( |
108 std::string* mime_type, | 107 std::string* mime_type, |
109 std::string* charset, | 108 std::string* charset, |
110 std::string* data, | 109 std::string* data, |
111 const net::CompletionCallback& callback) const { | 110 const net::CompletionCallback& callback) const { |
112 // TODO(vadimt): Remove ScopedTracker below once crbug.com/422489 is fixed. | |
113 tracked_objects::ScopedTracker tracking_profile( | |
114 FROM_HERE_WITH_EXPLICIT_FUNCTION( | |
115 "422489 TcmallocInternalsRequestJob::GetData")); | |
116 | |
117 mime_type->assign("text/html"); | 111 mime_type->assign("text/html"); |
118 charset->assign("UTF8"); | 112 charset->assign("UTF8"); |
119 | 113 |
120 data->clear(); | 114 data->clear(); |
121 #if defined(USE_TCMALLOC) | 115 #if defined(USE_TCMALLOC) |
122 AboutTcmalloc(data); | 116 AboutTcmalloc(data); |
123 #endif | 117 #endif |
124 return net::OK; | 118 return net::OK; |
125 } | 119 } |
126 | 120 |
127 } // namespace content | 121 } // namespace content |
OLD | NEW |