| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 return true; | 387 return true; |
| 388 | 388 |
| 389 if (!log_file_name) | 389 if (!log_file_name) |
| 390 log_file_name = new PathString(); | 390 log_file_name = new PathString(); |
| 391 *log_file_name = new_log_file; | 391 *log_file_name = new_log_file; |
| 392 if (delete_old == DELETE_OLD_LOG_FILE) | 392 if (delete_old == DELETE_OLD_LOG_FILE) |
| 393 DeleteFilePath(*log_file_name); | 393 DeleteFilePath(*log_file_name); |
| 394 | 394 |
| 395 return InitializeLogFileHandle(); | 395 return InitializeLogFileHandle(); |
| 396 #else | 396 #else |
| 397 (void) g_vlog_info_prev; |
| 397 return true; | 398 return true; |
| 398 #endif // !defined(OS_NACL) | 399 #endif // !defined(OS_NACL) |
| 399 } | 400 } |
| 400 | 401 |
| 401 void SetMinLogLevel(int level) { | 402 void SetMinLogLevel(int level) { |
| 402 min_log_level = std::min(LOG_ERROR_REPORT, level); | 403 min_log_level = std::min(LOG_ERROR_REPORT, level); |
| 403 } | 404 } |
| 404 | 405 |
| 405 int GetMinLogLevel() { | 406 int GetMinLogLevel() { |
| 406 return min_log_level; | 407 return min_log_level; |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 851 } | 852 } |
| 852 | 853 |
| 853 // This was defined at the beginning of this file. | 854 // This was defined at the beginning of this file. |
| 854 #undef write | 855 #undef write |
| 855 | 856 |
| 856 } // namespace logging | 857 } // namespace logging |
| 857 | 858 |
| 858 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { | 859 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { |
| 859 return out << WideToUTF8(std::wstring(wstr)); | 860 return out << WideToUTF8(std::wstring(wstr)); |
| 860 } | 861 } |
| OLD | NEW |