Merge from Chromium at DEPS revision r198571

This commit was generated by merge_to_master.py.

Change-Id: I951118a03836157090561764dd2627f0add8118f
diff --git a/base/logging.cc b/base/logging.cc
index 462ac8b..0c4a302 100644
--- a/base/logging.cc
+++ b/base/logging.cc
@@ -29,8 +29,8 @@
 #if defined(OS_POSIX)
 #include <errno.h>
 #include <pthread.h>
-#include <stdlib.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
 #define MAX_PATH PATH_MAX
@@ -50,7 +50,7 @@
 #include "base/debug/debugger.h"
 #include "base/debug/stack_trace.h"
 #include "base/posix/eintr_wrapper.h"
-#include "base/string_piece.h"
+#include "base/strings/string_piece.h"
 #include "base/synchronization/lock_impl.h"
 #include "base/threading/platform_thread.h"
 #include "base/utf_string_conversions.h"
@@ -163,6 +163,8 @@
 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 @@
                          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 @@
     DeleteFilePath(*log_file_name);
 
   return InitializeLogFileHandle();
-#else
-  (void) g_vlog_info_prev;
-  return true;
-#endif  // !defined(OS_NACL)
 }
 
 void SetMinLogLevel(int level) {