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

Side by Side Diff: content/renderer/devtools/devtools_agent.cc

Issue 12224030: Linux: add option to use system tcmalloc (off by default) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 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 | « content/content_renderer.gypi ('k') | tools/generate_shim_headers/generate_shim_headers.py » ('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 "content/renderer/devtools/devtools_agent.h" 5 #include "content/renderer/devtools/devtools_agent.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 void DevToolsAgent::clearBrowserCache() { 124 void DevToolsAgent::clearBrowserCache() {
125 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id())); 125 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id()));
126 } 126 }
127 127
128 void DevToolsAgent::clearBrowserCookies() { 128 void DevToolsAgent::clearBrowserCookies() {
129 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id())); 129 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
130 } 130 }
131 131
132 #if defined(USE_TCMALLOC) && !defined(OS_WIN) 132 #if defined(USE_TCMALLOC) && !defined(OS_WIN) && !defined(USE_SYSTEM_TCMALLOC)
133 static void AllocationVisitor(void* data, const void* ptr) { 133 static void AllocationVisitor(void* data, const void* ptr) {
134 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; 134 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
135 Visitor* visitor = reinterpret_cast<Visitor*>(data); 135 Visitor* visitor = reinterpret_cast<Visitor*>(data);
136 visitor->visitObject(ptr); 136 visitor->visitObject(ptr);
137 } 137 }
138 #endif 138 #endif
139 139
140 void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) { 140 void DevToolsAgent::visitAllocatedObjects(AllocatedObjectVisitor* visitor) {
141 #if defined(USE_TCMALLOC) && !defined(OS_WIN) 141 #if defined(USE_TCMALLOC) && !defined(OS_WIN) && !defined(USE_SYSTEM_TCMALLOC)
142 IterateAllocatedObjects(&AllocationVisitor, visitor); 142 IterateAllocatedObjects(&AllocationVisitor, visitor);
143 #endif 143 #endif
144 } 144 }
145 145
146 // static 146 // static
147 DevToolsAgent* DevToolsAgent::FromHostId(int host_id) { 147 DevToolsAgent* DevToolsAgent::FromHostId(int host_id) {
148 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(host_id); 148 IdToAgentMap::iterator it = g_agent_for_routing_id.Get().find(host_id);
149 if (it != g_agent_for_routing_id.Get().end()) { 149 if (it != g_agent_for_routing_id.Get().end()) {
150 return it->second; 150 return it->second;
151 } 151 }
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 if (!web_view) 236 if (!web_view)
237 return NULL; 237 return NULL;
238 return web_view->devToolsAgent(); 238 return web_view->devToolsAgent();
239 } 239 }
240 240
241 bool DevToolsAgent::IsAttached() { 241 bool DevToolsAgent::IsAttached() {
242 return is_attached_; 242 return is_attached_;
243 } 243 }
244 244
245 } // namespace content 245 } // namespace content
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | tools/generate_shim_headers/generate_shim_headers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698