Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(625)

Side by Side Diff: base/logging.cc

Issue 15403002: Remving global statics from the headers, so we can split-link. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: adding export Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « base/logging.h ('k') | base/logging_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698