| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ | 5 #ifndef CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ |
| 6 #define CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ | 6 #define CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ |
| 7 | 7 |
| 8 #include <guiddef.h> | 8 #include <guiddef.h> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 // rights; StartLogging() will return false if this is not the case. | 31 // rights; StartLogging() will return false if this is not the case. |
| 32 class FileLogger { | 32 class FileLogger { |
| 33 public: | 33 public: |
| 34 enum EventProviderBits { | 34 enum EventProviderBits { |
| 35 // Log messages from chrome.exe. | 35 // Log messages from chrome.exe. |
| 36 CHROME_LOG_PROVIDER = 1 << 0, | 36 CHROME_LOG_PROVIDER = 1 << 0, |
| 37 // Log messages from npchrome_frame.dll. | 37 // Log messages from npchrome_frame.dll. |
| 38 CHROME_FRAME_LOG_PROVIDER = 1 << 1, | 38 CHROME_FRAME_LOG_PROVIDER = 1 << 1, |
| 39 // Log messages from the current process. | 39 // Log messages from the current process. |
| 40 CHROME_TESTS_LOG_PROVIDER = 1 << 2, | 40 CHROME_TESTS_LOG_PROVIDER = 1 << 2, |
| 41 // Trace events. | |
| 42 CHROME_TRACE_EVENT_PROVIDER = 1 << 3, | |
| 43 }; | 41 }; |
| 44 | 42 |
| 45 static const uint32 kAllEventProviders = (CHROME_LOG_PROVIDER | | 43 static const uint32 kAllEventProviders = (CHROME_LOG_PROVIDER | |
| 46 CHROME_FRAME_LOG_PROVIDER | | 44 CHROME_FRAME_LOG_PROVIDER | |
| 47 CHROME_TESTS_LOG_PROVIDER | | 45 CHROME_TESTS_LOG_PROVIDER); |
| 48 CHROME_TRACE_EVENT_PROVIDER); | |
| 49 | 46 |
| 50 FileLogger(); | 47 FileLogger(); |
| 51 ~FileLogger(); | 48 ~FileLogger(); |
| 52 | 49 |
| 53 // Initializes the instance to collect logs from all supported providers. | 50 // Initializes the instance to collect logs from all supported providers. |
| 54 void Initialize(); | 51 void Initialize(); |
| 55 | 52 |
| 56 // Initializes the instance to collect logs from the providers present in | 53 // Initializes the instance to collect logs from the providers present in |
| 57 // the given mask; see EventProviderBits. | 54 // the given mask; see EventProviderBits. |
| 58 void Initialize(uint32 event_provider_mask); | 55 void Initialize(uint32 event_provider_mask); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 79 | 76 |
| 80 base::win::EtwTraceController controller_; | 77 base::win::EtwTraceController controller_; |
| 81 uint32 event_provider_mask_; | 78 uint32 event_provider_mask_; |
| 82 | 79 |
| 83 DISALLOW_COPY_AND_ASSIGN(FileLogger); | 80 DISALLOW_COPY_AND_ASSIGN(FileLogger); |
| 84 }; | 81 }; |
| 85 | 82 |
| 86 } // namespace logging_win | 83 } // namespace logging_win |
| 87 | 84 |
| 88 #endif // CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ | 85 #endif // CHROME_TEST_LOGGING_WIN_FILE_LOGGER_H_ |
| OLD | NEW |