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 "base/logging.h" | 5 #include "base/logging.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <io.h> | 8 #include <io.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 typedef HANDLE FileHandle; | 10 typedef HANDLE FileHandle; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #endif | 60 #endif |
61 | 61 |
62 #if defined(OS_ANDROID) | 62 #if defined(OS_ANDROID) |
63 #include <android/log.h> | 63 #include <android/log.h> |
64 #endif | 64 #endif |
65 | 65 |
66 namespace logging { | 66 namespace logging { |
67 | 67 |
68 DcheckState g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; | 68 DcheckState g_dcheck_state = DISABLE_DCHECK_FOR_NON_OFFICIAL_RELEASE_BUILDS; |
69 | 69 |
| 70 DcheckState get_dcheck_state() { |
| 71 return g_dcheck_state; |
| 72 } |
| 73 |
| 74 void set_dcheck_state(DcheckState state) { |
| 75 g_dcheck_state = state; |
| 76 } |
| 77 |
70 namespace { | 78 namespace { |
71 | 79 |
72 VlogInfo* g_vlog_info = NULL; | 80 VlogInfo* g_vlog_info = NULL; |
73 VlogInfo* g_vlog_info_prev = NULL; | 81 VlogInfo* g_vlog_info_prev = NULL; |
74 | 82 |
75 const char* const log_severity_names[LOG_NUM_SEVERITIES] = { | 83 const char* const log_severity_names[LOG_NUM_SEVERITIES] = { |
76 "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" }; | 84 "INFO", "WARNING", "ERROR", "ERROR_REPORT", "FATAL" }; |
77 | 85 |
78 int min_log_level = 0; | 86 int min_log_level = 0; |
79 | 87 |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 return *log_file_name; | 868 return *log_file_name; |
861 return std::wstring(); | 869 return std::wstring(); |
862 } | 870 } |
863 #endif | 871 #endif |
864 | 872 |
865 } // namespace logging | 873 } // namespace logging |
866 | 874 |
867 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { | 875 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { |
868 return out << WideToUTF8(std::wstring(wstr)); | 876 return out << WideToUTF8(std::wstring(wstr)); |
869 } | 877 } |
OLD | NEW |