summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 21:42:11 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-12 21:42:11 +0000
commit9bcc1b016b1e71de11787d94440dd5ca5e77ca77 (patch)
tree78179da85eaca00bc2b0592aa59c4925d65c33b9 /base
parent055ea435e935d8b2dec637340f3074750aa07fd7 (diff)
downloadchromium_src-9bcc1b016b1e71de11787d94440dd5ca5e77ca77.zip
chromium_src-9bcc1b016b1e71de11787d94440dd5ca5e77ca77.tar.gz
chromium_src-9bcc1b016b1e71de11787d94440dd5ca5e77ca77.tar.bz2
New test infrastructure for producing verbose logs in failing tests.
This infrastructure allows Google Test-based tests to opt-in to some magic that results in extremely verbose logs appearing in test output for only those tests that fail. This includes all LOG() messages generated by chrome.exe, npchrome_frame.exe, and the test executable itself, as well as all TRACE_EVENT_*_ETW events. The interesting entrypoints are in test_log_collector_win.h, file_logger_win.h, and log_file_printer_win.h. BUG=none TEST=none Review URL: http://codereview.chromium.org/9584017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@126240 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/logging_win.h4
-rw-r--r--base/win/event_trace_provider.cc10
2 files changed, 7 insertions, 7 deletions
diff --git a/base/logging_win.h b/base/logging_win.h
index d0758cd..4457569 100644
--- a/base/logging_win.h
+++ b/base/logging_win.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
@@ -19,7 +19,7 @@ struct StaticMemorySingletonTraits;
namespace logging {
// Event ID for the log messages we generate.
-extern const GUID kLogEventId;
+BASE_EXPORT extern const GUID kLogEventId;
// Feature enable mask for LogEventProvider.
enum LogEnableMask {
diff --git a/base/win/event_trace_provider.cc b/base/win/event_trace_provider.cc
index 332fac3..8fcf67d 100644
--- a/base/win/event_trace_provider.cc
+++ b/base/win/event_trace_provider.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 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.
//
@@ -84,12 +84,12 @@ ULONG EtwTraceProvider::Register() {
}
ULONG EtwTraceProvider::Unregister() {
+ // If a session is active, notify subclasses that it's going away.
+ if (session_handle_ != NULL)
+ DisableEvents();
+
ULONG ret = ::UnregisterTraceGuids(registration_handle_);
- // Make sure we don't log anything from here on.
- enable_level_ = 0;
- enable_flags_ = 0;
- session_handle_ = NULL;
registration_handle_ = NULL;
return ret;