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

Unified Diff: base/logging.cc

Issue 10909164: LoggingLock::Init() should append a non-empty string to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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\\");
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698