summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_creator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_creator.cc')
-rw-r--r--chrome/browser/extensions/extension_creator.cc25
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;
}