Revert debug logging to ExtensionUnpackerTests. We have enough data.

BUG=108724
TEST=no

Review URL: https://chromiumcodereview.appspot.com/9270057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118749 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index ceb94d75..e07f68c 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -26,10 +26,6 @@
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "webkit/glue/image_decoder.h"
 
-// Temporary code to help debug a crashing unit test.
-bool g_bug108724_debug = false;
-#define BUG108724_LOG() if (g_bug108724_debug) LOG(WARNING)
-
 namespace errors = extension_manifest_errors;
 namespace keys = extension_manifest_keys;
 namespace filenames = extension_filenames;
@@ -155,9 +151,7 @@
 
   // <profile>/Extensions/INSTALL_TEMP/<version>
   temp_install_dir_ =
-      extension_path_.DirName().AppendASCII(filenames::kTempExtensionName);
-
-  BUG108724_LOG() << "ExtensionUnpacker dir: " << temp_install_dir_.value();
+    extension_path_.DirName().AppendASCII(filenames::kTempExtensionName);
 
   if (!file_util::CreateDirectory(temp_install_dir_)) {
 #if defined(OS_WIN)
@@ -166,30 +160,19 @@
     std::string dir_string = temp_install_dir_.value();
 #endif
 
-    BUG108724_LOG() << "ExtensionUnpacker CreateDirectory fail.";
     SetError(kCouldNotCreateDirectoryError + dir_string);
     return false;
   }
 
-  BUG108724_LOG() << "ExtensionUnpacker Unzip...";
-
   if (!zip::Unzip(extension_path_, temp_install_dir_)) {
-    BUG108724_LOG() << "ExtensionUnpacker Unzip fail";
     SetError(kCouldNotUnzipExtension);
     return false;
   }
 
-  BUG108724_LOG() << "ExtensionUnpacker ReadManifest...";
-
   // Parse the manifest.
   parsed_manifest_.reset(ReadManifest());
-  if (!parsed_manifest_.get()) {
-    BUG108724_LOG() << "ExtensionUnpacker ReadManifest fail: " <<
-        error_message_;
+  if (!parsed_manifest_.get())
     return false;  // Error was already reported.
-  }
-
-  BUG108724_LOG() << "ExtensionUnpacker CreateExtension...";
 
   // NOTE: Since the unpacker doesn't have the extension's public_id, the
   // InitFromValue is allowed to generate a temporary id for the extension.
@@ -203,15 +186,11 @@
       creation_flags_,
       &error));
   if (!extension.get()) {
-    BUG108724_LOG() << "ExtensionUnpacker CreateExtension fail: " << error;
     SetError(error);
     return false;
   }
 
-  BUG108724_LOG() << "ExtensionUnpacker ValidateExtension...";
-
   if (!extension_file_util::ValidateExtension(extension.get(), &error)) {
-    BUG108724_LOG() << "ExtensionUnpacker ValidateExtension fail: " << error;
     SetError(error);
     return false;
   }
diff --git a/chrome/common/extensions/extension_unpacker.h b/chrome/common/extensions/extension_unpacker.h
index 33e7e09..d9c56d2 100644
--- a/chrome/common/extensions/extension_unpacker.h
+++ b/chrome/common/extensions/extension_unpacker.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -114,7 +114,4 @@
   DISALLOW_COPY_AND_ASSIGN(ExtensionUnpacker);
 };
 
-// TODO(mpcomplete): remove after debugging http://crbug.com/108724
-extern bool g_bug108724_debug;
-
 #endif  // CHROME_COMMON_EXTENSIONS_EXTENSION_UNPACKER_H_
diff --git a/chrome/common/extensions/extension_unpacker_unittest.cc b/chrome/common/extensions/extension_unpacker_unittest.cc
index d3fb401..d50eb8cf 100644
--- a/chrome/common/extensions/extension_unpacker_unittest.cc
+++ b/chrome/common/extensions/extension_unpacker_unittest.cc
@@ -47,77 +47,44 @@
 };
 
 // Crashes intermittently on Windows, see http://crbug.com/109238
-// TODO(mpcomplete): Temporary enabled to debug.
-#if 0  // defined(OS_WIN)
+#if defined(OS_WIN)
 #define MAYBE_EmptyDefaultLocale DISABLED_EmptyDefaultLocale
 #else
 #define MAYBE_EmptyDefaultLocale EmptyDefaultLocale
 #endif
 TEST_F(ExtensionUnpackerTest, MAYBE_EmptyDefaultLocale) {
-  g_bug108724_debug = true;
-  LOG(WARNING) << "Setting up.";
   SetupUnpacker("empty_default_locale.crx");
-  LOG(WARNING) << "Running unpacker.";
   EXPECT_FALSE(unpacker_->Run());
-  LOG(WARNING) << "Done.";
   EXPECT_EQ(ASCIIToUTF16(errors::kInvalidDefaultLocale),
             unpacker_->error_message());
-  LOG(WARNING) << "Equal.";
-  LOG(WARNING) << "Cleanup: " << temp_dir_.Delete();
-  LOG(WARNING) << "Cleanup2:";
-  unpacker_.reset();
-  LOG(WARNING) << "All clean.";
-  g_bug108724_debug = false;
 }
 
 // Crashes intermittently on Vista, see http://crbug.com/109385
-// TODO(mpcomplete): Temporary enabled to debug.
-#if 0  // defined(OS_WIN)
+#if defined(OS_WIN)
 #define MAYBE_HasDefaultLocaleMissingLocalesFolder \
-    DISABLED_HasDefaultLocaleMissingLocalesFolder
+  DISABLED_HasDefaultLocaleMissingLocalesFolder
 #else
 #define MAYBE_HasDefaultLocaleMissingLocalesFolder \
-    HasDefaultLocaleMissingLocalesFolder
+  HasDefaultLocaleMissingLocalesFolder
 #endif
 TEST_F(ExtensionUnpackerTest, MAYBE_HasDefaultLocaleMissingLocalesFolder) {
-  g_bug108724_debug = true;
-  LOG(WARNING) << "Setting up.";
   SetupUnpacker("has_default_missing_locales.crx");
-  LOG(WARNING) << "Running unpacker.";
   EXPECT_FALSE(unpacker_->Run());
-  LOG(WARNING) << "Done.";
   EXPECT_EQ(ASCIIToUTF16(errors::kLocalesTreeMissing),
             unpacker_->error_message());
-  LOG(WARNING) << "Equal.";
-  LOG(WARNING) << "Cleanup: " << temp_dir_.Delete();
-  LOG(WARNING) << "Cleanup2:";
-  unpacker_.reset();
-  LOG(WARNING) << "All clean.";
-  g_bug108724_debug = false;
 }
 
 // Crashes intermittently on Windows, see http://crbug.com/109238
-// TODO(mpcomplete): Temporary enabled to debug.
-#if 0  // defined(OS_WIN)
+#if defined(OS_WIN)
 #define MAYBE_InvalidDefaultLocale DISABLED_InvalidDefaultLocale
 #else
 #define MAYBE_InvalidDefaultLocale InvalidDefaultLocale
 #endif
 TEST_F(ExtensionUnpackerTest, MAYBE_InvalidDefaultLocale) {
-  g_bug108724_debug = true;
-  LOG(WARNING) << "Setting up.";
   SetupUnpacker("invalid_default_locale.crx");
-  LOG(WARNING) << "Running unpacker.";
   EXPECT_FALSE(unpacker_->Run());
-  LOG(WARNING) << "Done.";
   EXPECT_EQ(ASCIIToUTF16(errors::kInvalidDefaultLocale),
             unpacker_->error_message());
-  LOG(WARNING) << "Equal.";
-  LOG(WARNING) << "Cleanup: " << temp_dir_.Delete();
-  LOG(WARNING) << "Cleanup2:";
-  unpacker_.reset();
-  LOG(WARNING) << "All clean.";
-  g_bug108724_debug = false;
 }
 
 // Crashes intermittently on Windows, see http://crbug.com/109738