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

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

Issue 12150004: Category group support/Renamings. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added destructor for CategoryFilter class per CQ failure. Created 7 years, 8 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
« no previous file with comments | « content/public/browser/trace_subscriber.h ('k') | content/renderer/render_thread_impl.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) 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/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id())); 130 Send(new DevToolsHostMsg_ClearBrowserCache(routing_id()));
131 } 131 }
132 132
133 void DevToolsAgent::clearBrowserCookies() { 133 void DevToolsAgent::clearBrowserCookies() {
134 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id())); 134 Send(new DevToolsHostMsg_ClearBrowserCookies(routing_id()));
135 } 135 }
136 136
137 void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) { 137 void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) {
138 TraceLog* trace_log = TraceLog::GetInstance(); 138 TraceLog* trace_log = TraceLog::GetInstance();
139 trace_log->SetEventCallback(cb); 139 trace_log->SetEventCallback(cb);
140 trace_log->SetEnabled(!!cb, TraceLog::RECORD_UNTIL_FULL); 140 if (!!cb) {
141 trace_log->SetEnabled(base::debug::CategoryFilter(
142 base::debug::CategoryFilter::kDefaultCategoryFilterString),
143 TraceLog::RECORD_UNTIL_FULL);
144 } else {
145 trace_log->SetDisabled();
146 }
141 } 147 }
142 148
143 #if defined(USE_TCMALLOC) && !defined(OS_WIN) 149 #if defined(USE_TCMALLOC) && !defined(OS_WIN)
144 static void AllocationVisitor(void* data, const void* ptr) { 150 static void AllocationVisitor(void* data, const void* ptr) {
145 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor; 151 typedef WebKit::WebDevToolsAgentClient::AllocatedObjectVisitor Visitor;
146 Visitor* visitor = reinterpret_cast<Visitor*>(data); 152 Visitor* visitor = reinterpret_cast<Visitor*>(data);
147 visitor->visitObject(ptr); 153 visitor->visitObject(ptr);
148 } 154 }
149 #endif 155 #endif
150 156
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (!web_view) 257 if (!web_view)
252 return NULL; 258 return NULL;
253 return web_view->devToolsAgent(); 259 return web_view->devToolsAgent();
254 } 260 }
255 261
256 bool DevToolsAgent::IsAttached() { 262 bool DevToolsAgent::IsAttached() {
257 return is_attached_; 263 return is_attached_;
258 } 264 }
259 265
260 } // namespace content 266 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/trace_subscriber.h ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698