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

Unified Diff: content/browser/tracing/tracing_controller_impl.cc

Issue 2440443002: tracing: remove WatchEvent feature (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.h ('k') | content/public/browser/tracing_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.cc
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index dd01ac66af2a13523ef02cb7ffe5bc82452da445..68f011fa36a82f7754ba1358544829cf36b99bf2 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -460,46 +460,6 @@ bool TracingControllerImpl::GetTraceBufferUsage(
return true;
}
-bool TracingControllerImpl::SetWatchEvent(
- const std::string& category_name,
- const std::string& event_name,
- const WatchEventCallback& callback) {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
- if (callback.is_null())
- return false;
-
- watch_category_name_ = category_name;
- watch_event_name_ = event_name;
- watch_event_callback_ = callback;
-
- TraceLog::GetInstance()->SetWatchEvent(
- category_name, event_name,
- base::Bind(&TracingControllerImpl::OnWatchEventMatched,
- base::Unretained(this)));
-
- for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
- it != trace_message_filters_.end(); ++it) {
- it->get()->SendSetWatchEvent(category_name, event_name);
- }
- return true;
-}
-
-bool TracingControllerImpl::CancelWatchEvent() {
- DCHECK_CURRENTLY_ON(BrowserThread::UI);
-
- if (!can_cancel_watch_event())
- return false;
-
- for (TraceMessageFilterSet::iterator it = trace_message_filters_.begin();
- it != trace_message_filters_.end(); ++it) {
- it->get()->SendCancelWatchEvent();
- }
-
- watch_event_callback_.Reset();
- return true;
-}
-
bool TracingControllerImpl::IsTracing() const {
return is_tracing_;
}
@@ -523,10 +483,6 @@ void TracingControllerImpl::AddTraceMessageFilter(
#endif
trace_message_filters_.insert(trace_message_filter);
- if (can_cancel_watch_event()) {
- trace_message_filter->SendSetWatchEvent(watch_category_name_,
- watch_event_name_);
- }
if (can_stop_tracing()) {
trace_message_filter->SendBeginTracing(
TraceLog::GetInstance()->GetCurrentTraceConfig());
@@ -789,18 +745,6 @@ void TracingControllerImpl::OnTraceLogStatusReply(
}
}
-void TracingControllerImpl::OnWatchEventMatched() {
- if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&TracingControllerImpl::OnWatchEventMatched,
- base::Unretained(this)));
- return;
- }
-
- if (!watch_event_callback_.is_null())
- watch_event_callback_.Run();
-}
-
void TracingControllerImpl::RegisterTracingUI(TracingUI* tracing_ui) {
DCHECK(tracing_uis_.find(tracing_ui) == tracing_uis_.end());
tracing_uis_.insert(tracing_ui);
« no previous file with comments | « content/browser/tracing/tracing_controller_impl.h ('k') | content/public/browser/tracing_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698