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

Unified Diff: base/logging.cc

Issue 13866034: Pepper: Add VLOG support for NaCl plugins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 8 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 | « base/base_untrusted.gyp ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/logging.cc
diff --git a/base/logging.cc b/base/logging.cc
index b5e4999ff880eeebe5ee579fd2a79c575c615374..0c4a3027340abf8777e7ad56218e02a3241b021d 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -163,6 +163,8 @@ void CloseFile(FileHandle log) {
void DeleteFilePath(const PathString& log_name) {
#if defined(OS_WIN)
DeleteFile(log_name.c_str());
+#elif defined (OS_NACL)
+ // Do nothing; unlink() isn't supported on NaCl.
#else
unlink(log_name.c_str());
#endif
@@ -348,9 +350,11 @@ bool BaseInitLoggingImpl(const PathChar* new_log_file,
LogLockingState lock_log,
OldFileDeletionState delete_old,
DcheckState dcheck_state) {
+#if defined(OS_NACL)
+ CHECK(logging_dest == LOG_NONE ||
+ logging_dest == LOG_ONLY_TO_SYSTEM_DEBUG_LOG);
+#endif
g_dcheck_state = dcheck_state;
-// TODO(bbudge) Hook this up to NaCl logging.
-#if !defined(OS_NACL)
CommandLine* command_line = CommandLine::ForCurrentProcess();
// Don't bother initializing g_vlog_info unless we use one of the
// vlog switches.
@@ -393,10 +397,6 @@ bool BaseInitLoggingImpl(const PathChar* new_log_file,
DeleteFilePath(*log_file_name);
return InitializeLogFileHandle();
-#else
- (void) g_vlog_info_prev;
- return true;
-#endif // !defined(OS_NACL)
}
void SetMinLogLevel(int level) {
« no previous file with comments | « base/base_untrusted.gyp ('k') | chrome/browser/nacl_host/nacl_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698