| 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 BASE_LOGGING_WIN_H_ | 5 #ifndef BASE_LOGGING_WIN_H_ |
| 6 #define BASE_LOGGING_WIN_H_ | 6 #define BASE_LOGGING_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 static LogEventProvider* GetInstance(); | 54 static LogEventProvider* GetInstance(); |
| 55 | 55 |
| 56 static bool LogMessage(logging::LogSeverity severity, const char* file, | 56 static bool LogMessage(logging::LogSeverity severity, const char* file, |
| 57 int line, size_t message_start, const std::string& str); | 57 int line, size_t message_start, const std::string& str); |
| 58 | 58 |
| 59 static void Initialize(const GUID& provider_name); | 59 static void Initialize(const GUID& provider_name); |
| 60 static void Uninitialize(); | 60 static void Uninitialize(); |
| 61 | 61 |
| 62 protected: | 62 protected: |
| 63 // Overridden to manipulate the log level on ETW control callbacks. | 63 // Overridden to manipulate the log level on ETW control callbacks. |
| 64 virtual void OnEventsEnabled(); | 64 void OnEventsEnabled() override; |
| 65 virtual void OnEventsDisabled(); | 65 void OnEventsDisabled() override; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 LogEventProvider(); | 68 LogEventProvider(); |
| 69 | 69 |
| 70 // The log severity prior to OnEventsEnabled, | 70 // The log severity prior to OnEventsEnabled, |
| 71 // restored in OnEventsDisabled. | 71 // restored in OnEventsDisabled. |
| 72 logging::LogSeverity old_log_level_; | 72 logging::LogSeverity old_log_level_; |
| 73 | 73 |
| 74 friend struct StaticMemorySingletonTraits<LogEventProvider>; | 74 friend struct StaticMemorySingletonTraits<LogEventProvider>; |
| 75 DISALLOW_COPY_AND_ASSIGN(LogEventProvider); | 75 DISALLOW_COPY_AND_ASSIGN(LogEventProvider); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace logging | 78 } // namespace logging |
| 79 | 79 |
| 80 #endif // BASE_LOGGING_WIN_H_ | 80 #endif // BASE_LOGGING_WIN_H_ |
| OLD | NEW |