diff options
author | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 15:39:39 +0000 |
---|---|---|
committer | skerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 15:39:39 +0000 |
commit | 075be5d0fe3c21a7405906172dafc76f2343b3da (patch) | |
tree | 90c5617c9010e5eff5159de111f61084e4930fd2 /chrome/common | |
parent | 3cc47d6ba4dd8f5522e0b1939c3906742d964d94 (diff) | |
download | chromium_src-075be5d0fe3c21a7405906172dafc76f2343b3da.zip chromium_src-075be5d0fe3c21a7405906172dafc76f2343b3da.tar.gz chromium_src-075be5d0fe3c21a7405906172dafc76f2343b3da.tar.bz2 |
Remove logging for issue 35198.
Remove switch --issue35198-logging .
BUG=56664
TEST=Install an extension on all platforms.
Review URL: http://codereview.chromium.org/3427019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unpacker.cc | 34 |
3 files changed, 7 insertions, 32 deletions
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index f3ee9f3..3f0da98 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -678,10 +678,6 @@ const char kInternalNaCl[] = "internal-nacl"; // Runs a trusted Pepper plugin inside the renderer process. const char kInternalPepper[] = "internal-pepper"; -// The following flag allows users who can reproduce crbug/35198 -// to enable extra logging. It will be removed once the issue is fixed. -const char kIssue35198ExtraLogging[] = "issue35198-logging"; - // Specifies the flags passed to JS engine const char kJavaScriptFlags[] = "js-flags"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index e9fa031..105d522 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -197,7 +197,6 @@ extern const char kInProcessWebGL[]; extern const char kIncognito[]; extern const char kInternalNaCl[]; extern const char kInternalPepper[]; -extern const char kIssue35198ExtraLogging[]; extern const char kJavaScriptFlags[]; extern const char kKeepAliveForTest[]; extern const char kLoadExtension[]; diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc index 23950c5..a758a55 100644 --- a/chrome/common/extensions/extension_unpacker.cc +++ b/chrome/common/extensions/extension_unpacker.cc @@ -4,7 +4,6 @@ #include "chrome/common/extensions/extension_unpacker.h" -#include "base/command_line.h" #include "base/file_util.h" #include "base/scoped_handle.h" #include "base/scoped_temp_dir.h" @@ -13,7 +12,6 @@ #include "base/utf_string_conversions.h" #include "base/values.h" #include "net/base/file_stream.h" -#include "chrome/common/chrome_switches.h" #include "chrome/common/common_param_traits.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" @@ -151,33 +149,17 @@ bool ExtensionUnpacker::Run() { temp_install_dir_ = extension_path_.DirName().AppendASCII(filenames::kTempExtensionName); + if (!file_util::CreateDirectory(temp_install_dir_)) { + #if defined(OS_WIN) - // To understand crbug/35198, allow users who can reproduce the issue - // to enable extra logging while unpacking. - bool extra_logging = CommandLine::ForCurrentProcess()->HasSwitch( - switches::kIssue35198ExtraLogging); - LOG(INFO) << "Extra logging for issue 35198: " << extra_logging; - - std::ostringstream log_stream; - std::string dir_string = WideToUTF8(temp_install_dir_.value()); - log_stream << kCouldNotCreateDirectoryError << dir_string << std::endl; - - if (!file_util::CreateDirectoryExtraLogging(temp_install_dir_, log_stream)) { - if (extra_logging) { - log_stream.flush(); - SetError(log_stream.str()); - } else { - SetError(kCouldNotCreateDirectoryError + dir_string); - } - return false; - } + std::string dir_string = WideToUTF8(temp_install_dir_.value()); #else - if (!file_util::CreateDirectory(temp_install_dir_)) { std::string dir_string = temp_install_dir_.value(); +#endif + SetError(kCouldNotCreateDirectoryError + dir_string); return false; } -#endif if (!Unzip(extension_path_, temp_install_dir_)) { SetError(kCouldNotUnzipExtension); @@ -189,15 +171,13 @@ bool ExtensionUnpacker::Run() { if (!parsed_manifest_.get()) return false; // Error was already reported. - // NOTE: Since the Unpacker doesn't have the extension's public_id, the + // NOTE: Since the unpacker doesn't have the extension's public_id, the // InitFromValue is allowed to generate a temporary id for the extension. // ANY CODE THAT FOLLOWS SHOULD NOT DEPEND ON THE CORRECT ID OF THIS // EXTENSION. Extension extension(temp_install_dir_); std::string error; - if (!extension.InitFromValue(*parsed_manifest_, - false, - &error)) { + if (!extension.InitFromValue(*parsed_manifest_, false, &error)) { SetError(error); return false; } |