diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 00:43:37 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 00:43:37 +0000 |
commit | ca0e201094b6f34d4703b3a8daa88e5328c60bc4 (patch) | |
tree | da1030dede740c5b1bc60d43a9f4c9b36f6dcc29 /chrome/browser/extensions/extension_creator.cc | |
parent | 038a1619f9df1f91c4da9af660810fd6b4759c65 (diff) | |
download | chromium_src-ca0e201094b6f34d4703b3a8daa88e5328c60bc4.zip chromium_src-ca0e201094b6f34d4703b3a8daa88e5328c60bc4.tar.gz chromium_src-ca0e201094b6f34d4703b3a8daa88e5328c60bc4.tar.bz2 |
Revert 116407 - Update Extension Pack UI to warn before overwriting existing CRX
BUG=35194
TEST=Try packing an extension from the browser, both overwriting and not overwriting an existing crx. And do a commandline browser extension pack.
Review URL: http://codereview.chromium.org/9044002
TBR=aa@chromium.org
Review URL: http://codereview.chromium.org/9102001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_creator.cc')
-rw-r--r-- | chrome/browser/extensions/extension_creator.cc | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/chrome/browser/extensions/extension_creator.cc b/chrome/browser/extensions/extension_creator.cc index 394c6e8..97a5d5f 100644 --- a/chrome/browser/extensions/extension_creator.cc +++ b/chrome/browser/extensions/extension_creator.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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. @@ -27,15 +27,10 @@ namespace { const int kRSAKeySize = 1024; }; -ExtensionCreator::ExtensionCreator() : error_type_(kOther) { -} - bool ExtensionCreator::InitializeInput( const FilePath& extension_dir, - const FilePath& crx_path, const FilePath& private_key_path, - const FilePath& private_key_output_path, - int run_flags) { + const FilePath& private_key_output_path) { // Validate input |extension_dir|. if (extension_dir.value().empty() || !file_util::DirectoryExists(extension_dir)) { @@ -69,15 +64,6 @@ bool ExtensionCreator::InitializeInput( return false; } - // Check whether crx file already exists. Should be last check, as this is - // a warning only. - if (!(run_flags & kOverwriteCRX) && file_util::PathExists(crx_path)) { - error_message_ = l10n_util::GetStringUTF8(IDS_EXTENSION_CRX_EXISTS); - error_type_ = kCRXExists; - - return false; - } - // Load the extension once. We don't really need it, but this does a lot of // useful validation of the structure. scoped_refptr<Extension> extension( @@ -262,11 +248,10 @@ bool ExtensionCreator::WriteCRX(const FilePath& zip_path, bool ExtensionCreator::Run(const FilePath& extension_dir, const FilePath& crx_path, const FilePath& private_key_path, - const FilePath& output_private_key_path, - int run_flags) { + const FilePath& output_private_key_path) { // Check input diretory and read manifest. - if (!InitializeInput(extension_dir, crx_path, private_key_path, - output_private_key_path, run_flags)) { + if (!InitializeInput(extension_dir, private_key_path, + output_private_key_path)) { return false; } |