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

Unified Diff: components/nacl/renderer/plugin/utility.cc

Issue 1631413002: NaCl cleanup: Remove not-very-useful debug logging in the plugin code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 4 years, 11 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 | « components/nacl/renderer/plugin/utility.h ('k') | components/nacl/renderer/ppb_nacl_private.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/renderer/plugin/utility.cc
diff --git a/components/nacl/renderer/plugin/utility.cc b/components/nacl/renderer/plugin/utility.cc
index 14c770f79bb1492e8038240ec8fe741f431d5770..0cd9575611d1b47577ccc4bccae95dcb74054f0e 100644
--- a/components/nacl/renderer/plugin/utility.cc
+++ b/components/nacl/renderer/plugin/utility.cc
@@ -4,63 +4,11 @@
* found in the LICENSE file.
*/
-#include <stdarg.h>
-#include <stdlib.h>
-#include <string.h>
-
#include "components/nacl/renderer/plugin/utility.h"
#include "ppapi/cpp/module.h"
namespace plugin {
-int gNaClPluginDebugPrintEnabled = -1;
-
-/*
- * Prints formatted message to the log.
- */
-int NaClPluginPrintLog(const char *format, ...) {
- va_list arg;
- int out_size;
-
- static const int kStackBufferSize = 512;
- char stack_buffer[kStackBufferSize];
-
- // Just log locally to stderr if we can't use the nacl interface.
- if (!GetNaClInterface()) {
- va_start(arg, format);
- int rc = vfprintf(stderr, format, arg);
- va_end(arg);
- return rc;
- }
-
- va_start(arg, format);
- out_size = vsnprintf(stack_buffer, kStackBufferSize, format, arg);
- va_end(arg);
- if (out_size < kStackBufferSize) {
- GetNaClInterface()->Vlog(stack_buffer);
- } else {
- // Message too large for our stack buffer; we have to allocate memory
- // instead.
- char *buffer = static_cast<char*>(malloc(out_size + 1));
- va_start(arg, format);
- vsnprintf(buffer, out_size + 1, format, arg);
- va_end(arg);
- GetNaClInterface()->Vlog(buffer);
- free(buffer);
- }
- return out_size;
-}
-
-/*
- * Currently looks for presence of NACL_PLUGIN_DEBUG and returns
- * 0 if absent and 1 if present. In the future we may include notions
- * of verbosity level.
- */
-int NaClPluginDebugPrintCheckEnv() {
- char* env = getenv("NACL_PLUGIN_DEBUG");
- return (NULL != env);
-}
-
// We cache the NaCl interface pointer and ensure that its set early on, on the
// main thread. This allows GetNaClInterface() to be used from non-main threads.
static const PPB_NaCl_Private* g_nacl_interface = NULL;
« no previous file with comments | « components/nacl/renderer/plugin/utility.h ('k') | components/nacl/renderer/ppb_nacl_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698