Chromium Code Reviews| Index: base/logging.cc |
| =================================================================== |
| --- base/logging.cc (revision 155649) |
| +++ base/logging.cc (working copy) |
| @@ -211,10 +211,13 @@ |
| #if defined(OS_WIN) |
| if (!log_mutex) { |
| std::wstring safe_name; |
| - if (new_log_file) |
| + if (!new_log_file) { |
| + safe_name = GetDefaultLogFile(); |
| + } else if (new_log_file[0]) { |
|
brettw
2012/09/11 19:20:54
Should we just be asserting that people don't give
wtc
2012/09/11 21:44:46
We can't assert that because in Release builds, Ch
wtc
2012/09/11 22:36:50
For this function (LoggingLock::Init), any non-emp
brettw
2012/09/11 22:43:31
Let's add a comment here that if the client sent n
wtc
2012/09/12 20:29:57
I will add some comments to base/logging.h to docu
|
| safe_name = new_log_file; |
| - else |
| - safe_name = GetDefaultLogFile(); |
| + } else { |
| + safe_name = L"<NotLoggingToFile>"; |
| + } |
|
wtc
2012/09/11 04:17:49
I am assuming |new_log_file| may have three cases.
|
| // \ is not a legal character in mutex names so we replace \ with / |
| std::replace(safe_name.begin(), safe_name.end(), '\\', '/'); |
| std::wstring t(L"Global\\"); |