diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 17:32:45 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-22 17:32:45 +0000 |
commit | ac07ec5b9c77be3f04ba27b4ea1287a92862fd67 (patch) | |
tree | 4508962cd054fdd58b94a71ef83a4e01a49bebbd /base | |
parent | 58e562f1943f88aed92297a5302f4610fb0fb7dd (diff) | |
download | chromium_src-ac07ec5b9c77be3f04ba27b4ea1287a92862fd67.zip chromium_src-ac07ec5b9c77be3f04ba27b4ea1287a92862fd67.tar.gz chromium_src-ac07ec5b9c77be3f04ba27b4ea1287a92862fd67.tar.bz2 |
Pepper: Add VLOG support for NaCl plugins.
Previously, VLOG statements would never log anything to the console, since
there was no way for state from the "v" and "vmodule" flags to be passed to the
untrusted NaCl process.
This change passes the values of the "v" and "vmodule" flags to the untrusted
process as part of channel creation, and then re-initializes the logging
subsystem to parse the new flag values.
BUG=181607
R=dmichael
Review URL: https://codereview.chromium.org/13866034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/base.gypi | 1 | ||||
-rw-r--r-- | base/base_untrusted.gyp | 2 | ||||
-rw-r--r-- | base/logging.cc | 12 |
3 files changed, 8 insertions, 7 deletions
diff --git a/base/base.gypi b/base/base.gypi index 164aa23..c8c5c37 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -620,7 +620,6 @@ 'allocator/type_profiler_control.cc', 'allocator/type_profiler_control.h', 'base_paths.cc', - 'command_line.cc', 'cpu.cc', 'debug/stack_trace_posix.cc', 'file_util.cc', diff --git a/base/base_untrusted.gyp b/base/base_untrusted.gyp index b63885b..a4c26b1 100644 --- a/base/base_untrusted.gyp +++ b/base/base_untrusted.gyp @@ -23,6 +23,8 @@ 'build_glibc': 1, 'build_newlib': 1, 'sources': [ + 'base_switches.cc', + 'base_switches.h', 'string16.cc', 'sync_socket_nacl.cc', 'time_posix.cc', diff --git a/base/logging.cc b/base/logging.cc index b5e4999..0c4a302 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) { |