OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 25 matching lines...) Expand all Loading... |
36 } else { | 36 } else { |
37 return base::StringPrintf("<failed to retrieve error message (0x%x)>", | 37 return base::StringPrintf("<failed to retrieve error message (0x%x)>", |
38 GetLastError()); | 38 GetLastError()); |
39 } | 39 } |
40 } | 40 } |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 namespace logging { | 44 namespace logging { |
45 | 45 |
46 NtstatusLogMessage::NtstatusLogMessage(const char* function, | 46 NtstatusLogMessage::NtstatusLogMessage( |
47 const char* file_path, | 47 #if defined(MINI_CHROMIUM_BASE_LOGGING_H_) |
48 int line, | 48 const char* function, |
49 LogSeverity severity, | 49 #endif |
50 DWORD ntstatus) | 50 const char* file_path, |
| 51 int line, |
| 52 LogSeverity severity, |
| 53 DWORD ntstatus) |
51 : LogMessage( | 54 : LogMessage( |
52 #if defined(MINI_CHROMIUM_BASE_LOGGING_H_) | 55 #if defined(MINI_CHROMIUM_BASE_LOGGING_H_) |
53 function, | 56 function, |
54 #endif | 57 #endif |
55 file_path, line, severity), ntstatus_(ntstatus) { | 58 file_path, |
| 59 line, |
| 60 severity), |
| 61 ntstatus_(ntstatus) { |
56 } | 62 } |
57 | 63 |
58 NtstatusLogMessage::~NtstatusLogMessage() { | 64 NtstatusLogMessage::~NtstatusLogMessage() { |
59 stream() << ": " << FormatNtstatus(ntstatus_) | 65 stream() << ": " << FormatNtstatus(ntstatus_) |
60 << base::StringPrintf(" (0x%08x)", ntstatus_); | 66 << base::StringPrintf(" (0x%08x)", ntstatus_); |
61 } | 67 } |
62 | 68 |
63 } // namespace logging | 69 } // namespace logging |
OLD | NEW |