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 #include "chrome/test/logging/win/file_logger.h" | 5 #include "chrome/test/logging/win/file_logger.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <guiddef.h> | 8 #include <guiddef.h> |
9 #include <objbase.h> | 9 #include <objbase.h> |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 const GUID* provider_name; | 46 const GUID* provider_name; |
47 uint8 level; | 47 uint8 level; |
48 uint32 flags; | 48 uint32 flags; |
49 } kProviders[] = { | 49 } kProviders[] = { |
50 { &kChromeTraceProviderName, 255, 0 }, | 50 { &kChromeTraceProviderName, 255, 0 }, |
51 { &kChromeFrameProvider, 255, 0 }, | 51 { &kChromeFrameProvider, 255, 0 }, |
52 { &kChromeTestsProvider, 255, 0 }, | 52 { &kChromeTestsProvider, 255, 0 }, |
53 { &base::debug::kChromeTraceProviderName, 255, 0 } | 53 { &base::debug::kChromeTraceProviderName, 255, 0 } |
54 }; | 54 }; |
55 | 55 |
56 COMPILE_ASSERT((1 << arraysize(kProviders)) - 1 == | 56 static_assert((1 << arraysize(kProviders)) - 1 == |
57 FileLogger::kAllEventProviders, | 57 FileLogger::kAllEventProviders, |
58 size_of_kProviders_is_inconsistent_with_kAllEventProviders); | 58 "size of kProviders is inconsistent with kAllEventProviders"); |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 bool FileLogger::is_initialized_ = false; | 62 bool FileLogger::is_initialized_ = false; |
63 | 63 |
64 FileLogger::FileLogger() | 64 FileLogger::FileLogger() |
65 : event_provider_mask_() { | 65 : event_provider_mask_() { |
66 } | 66 } |
67 | 67 |
68 FileLogger::~FileLogger() { | 68 FileLogger::~FileLogger() { |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 hr = controller_.Flush(NULL); | 179 hr = controller_.Flush(NULL); |
180 LOG_IF(ERROR, FAILED(hr)) | 180 LOG_IF(ERROR, FAILED(hr)) |
181 << "Failed to flush events; hr=" << std::hex << hr; | 181 << "Failed to flush events; hr=" << std::hex << hr; |
182 hr = controller_.Stop(NULL); | 182 hr = controller_.Stop(NULL); |
183 LOG_IF(ERROR, FAILED(hr)) | 183 LOG_IF(ERROR, FAILED(hr)) |
184 << "Failed to stop ETW session; hr=" << std::hex << hr; | 184 << "Failed to stop ETW session; hr=" << std::hex << hr; |
185 } | 185 } |
186 | 186 |
187 } // namespace logging_win | 187 } // namespace logging_win |
OLD | NEW |