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

Unified Diff: base/trace_event/trace_event_filter_test_utils.cc

Issue 2549103003: tracing: split trace event filter classes out of TraceLog (Closed)
Patch Set: . Created 4 years 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
Index: base/trace_event/trace_event_filter_test_utils.cc
diff --git a/base/trace_event/trace_event_filter_test_utils.cc b/base/trace_event/trace_event_filter_test_utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dbda25d6c5e2f8da2821adef800aaf9d544cbd81
--- /dev/null
+++ b/base/trace_event/trace_event_filter_test_utils.cc
@@ -0,0 +1,30 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/trace_event/trace_event_filter_test_utils.h"
+
+namespace base {
+namespace trace_event {
+
+// static
+const char TestEventFilter::kName[] = "testing_predicate";
+size_t TestEventFilter::filter_trace_event_hit_count_ = 0;
+size_t TestEventFilter::end_event_hit_count_ = 0;
+bool TestEventFilter::filter_return_value_ = false;
+
+TestEventFilter::TestEventFilter() {}
+TestEventFilter::~TestEventFilter() {}
+
+bool TestEventFilter::FilterTraceEvent(const TraceEvent& trace_event) const {
+ filter_trace_event_hit_count_++;
+ return filter_return_value_;
+}
+
+void TestEventFilter::EndEvent(const char* category_name,
+ const char* name) const {
+ end_event_hit_count_++;
+}
+
+} // namespace trace_event
+} // namespace base

Powered by Google App Engine
This is Rietveld 408576698