summaryrefslogtreecommitdiffstats
path: root/base/trace_event/trace_event_etw_export_win.h
diff options
context:
space:
mode:
authorgeorgesak <georgesak@chromium.org>2015-06-30 08:24:19 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-30 15:24:56 +0000
commit42779ff87cfaa569e82810211beee788819a41b1 (patch)
treef72b1290c505391c501aa6eef7c02dd9fc89c6df /base/trace_event/trace_event_etw_export_win.h
parent46d561aa35c887dd27c20e3aa5cd03276e0b7233 (diff)
downloadchromium_src-42779ff87cfaa569e82810211beee788819a41b1.zip
chromium_src-42779ff87cfaa569e82810211beee788819a41b1.tar.gz
chromium_src-42779ff87cfaa569e82810211beee788819a41b1.tar.bz2
[ETW Export] Restore implementation of IsETWExportEnabled and cleanup.
This mostly mechanical changes to cleanup the code and add more/better comments. Functionality wise, two changes: - IsETWExportEnabled uses once again etw_export_enabled_. This should stay like that until we get rid of the command line flag. - UpdateEnabledCategories now returns a boolean to indicate if there was change or not. BUG= Review URL: https://codereview.chromium.org/1220733002 Cr-Commit-Position: refs/heads/master@{#336788}
Diffstat (limited to 'base/trace_event/trace_event_etw_export_win.h')
-rw-r--r--base/trace_event/trace_event_etw_export_win.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/base/trace_event/trace_event_etw_export_win.h b/base/trace_event/trace_event_etw_export_win.h
index a9b580c..9f73d78 100644
--- a/base/trace_event/trace_event_etw_export_win.h
+++ b/base/trace_event/trace_event_etw_export_win.h
@@ -32,9 +32,9 @@ class BASE_EXPORT TraceEventETWExport {
static void EnableETWExport();
static void DisableETWExport();
- static bool IsETWExportEnabled() {
- return (GetInstance() && GetInstance()->etw_match_any_keyword_);
- }
+ // Returns true if ETW is enabled. For now, this is true if the command line
+ // flag is specified.
+ static bool IsETWExportEnabled();
// Exports an event to ETW. This is mainly used in
// TraceLog::AddTraceEventWithThreadIdAndTimestamp to export internal events.
@@ -64,15 +64,14 @@ class BASE_EXPORT TraceEventETWExport {
// Returns true if any category in the group is enabled.
static bool IsCategoryGroupEnabled(const char* category_group_name);
- void Resurrect();
-
private:
// Ensure only the provider can construct us.
friend struct StaticMemorySingletonTraits<TraceEventETWExport>;
TraceEventETWExport();
// Updates the list of enabled categories by consulting the ETW keyword.
- void UpdateEnabledCategories();
+ // Returns true if there was a change, false otherwise.
+ bool UpdateEnabledCategories();
// Returns true if the category is enabled.
bool IsCategoryEnabled(const char* category_name) const;