summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorrubentopo@gmail.com <rubentopo@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:49:03 +0000
committerrubentopo@gmail.com <rubentopo@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-19 08:49:03 +0000
commitd936677a24d0a18fc35935a999b066496f9a6ec7 (patch)
tree8943336492769d04e1cbe806b49912d32f485b8a /content/renderer
parentdf9416c847ceefdb4d1749cfd53866775f9a6535 (diff)
downloadchromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.zip
chromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.tar.gz
chromium_src-d936677a24d0a18fc35935a999b066496f9a6ec7.tar.bz2
Category group support/Renamings.
Related review: https://codereview.chromium.org/11823016/ BUG=168284 TEST=TraceEventTestFixture.Categories, TraceEventTestFixture.CategoryFilter R=nduca Review URL: https://chromiumcodereview.appspot.com/12150004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/devtools/devtools_agent.cc8
-rw-r--r--content/renderer/render_thread_impl.cc14
2 files changed, 14 insertions, 8 deletions
diff --git a/content/renderer/devtools/devtools_agent.cc b/content/renderer/devtools/devtools_agent.cc
index e959641..1ab030a 100644
--- a/content/renderer/devtools/devtools_agent.cc
+++ b/content/renderer/devtools/devtools_agent.cc
@@ -137,7 +137,13 @@ void DevToolsAgent::clearBrowserCookies() {
void DevToolsAgent::setTraceEventCallback(TraceEventCallback cb) {
TraceLog* trace_log = TraceLog::GetInstance();
trace_log->SetEventCallback(cb);
- trace_log->SetEnabled(!!cb, TraceLog::RECORD_UNTIL_FULL);
+ if (!!cb) {
+ trace_log->SetEnabled(base::debug::CategoryFilter(
+ base::debug::CategoryFilter::kDefaultCategoryFilterString),
+ TraceLog::RECORD_UNTIL_FULL);
+ } else {
+ trace_log->SetDisabled();
+ }
}
#if defined(USE_TCMALLOC) && !defined(OS_WIN)
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 94f8fcd..b4f6eab 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -208,12 +208,12 @@ void AddHistogramSample(void* hist, int sample) {
}
#if defined(ENABLE_WEBRTC)
-const unsigned char* GetCategoryEnabled(const char* name) {
- return TRACE_EVENT_API_GET_CATEGORY_ENABLED(name);
+const unsigned char* GetCategoryGroupEnabled(const char* category_group) {
+ return TRACE_EVENT_API_GET_CATEGORY_GROUP_ENABLED(category_group);
}
void AddTraceEvent(char phase,
- const unsigned char* category_enabled,
+ const unsigned char* category_group_enabled,
const char* name,
unsigned long long id,
int num_args,
@@ -221,9 +221,9 @@ void AddTraceEvent(char phase,
const unsigned char* arg_types,
const unsigned long long* arg_values,
unsigned char flags) {
- TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_enabled, name, id, num_args,
- arg_names, arg_types, arg_values, NULL,
- flags);
+ TRACE_EVENT_API_ADD_TRACE_EVENT(phase, category_group_enabled, name, id,
+ num_args, arg_names, arg_types, arg_values,
+ NULL, flags);
}
#endif
@@ -365,7 +365,7 @@ void RenderThreadImpl::Init() {
AddFilter(db_message_filter_.get());
#if defined(ENABLE_WEBRTC)
- webrtc::SetupEventTracer(&GetCategoryEnabled, &AddTraceEvent);
+ webrtc::SetupEventTracer(&GetCategoryGroupEnabled, &AddTraceEvent);
peer_connection_tracker_.reset(new PeerConnectionTracker());
AddObserver(peer_connection_tracker_.get());