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

Side by Side Diff: base/trace_event/event_name_filter.cc

Issue 2549103003: tracing: split trace event filter classes out of TraceLog (Closed)
Patch Set: Add BASE_EXPORT 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 unified diff | Download patch
« no previous file with comments | « base/trace_event/event_name_filter.h ('k') | base/trace_event/event_name_filter_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "base/trace_event/event_name_filter.h"
6
7 #include "base/trace_event/trace_event_impl.h"
8
9 namespace base {
10 namespace trace_event {
11
12 // static
13 const char EventNameFilter::kName[] = "event_whitelist_predicate";
14
15 EventNameFilter::EventNameFilter(
16 std::unique_ptr<EventNamesWhitelist> event_names_whitelist)
17 : event_names_whitelist_(std::move(event_names_whitelist)) {}
18
19 EventNameFilter::~EventNameFilter() {}
20
21 bool EventNameFilter::FilterTraceEvent(const TraceEvent& trace_event) const {
22 return event_names_whitelist_->count(trace_event.name()) != 0;
23 }
24
25 } // namespace trace_event
26 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/event_name_filter.h ('k') | base/trace_event/event_name_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698