diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 10:01:05 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 10:01:05 +0000 |
commit | 9f72aa09129fbd19a5ae253371019752a0624997 (patch) | |
tree | 6c54d2280ebdf31fe31f46fd3d882977324e4f3d /chrome/browser/extensions/sandboxed_extension_unpacker.cc | |
parent | 0a73a37731cf87370cb7c4f8dcb4801277c1d858 (diff) | |
download | chromium_src-9f72aa09129fbd19a5ae253371019752a0624997.zip chromium_src-9f72aa09129fbd19a5ae253371019752a0624997.tar.gz chromium_src-9f72aa09129fbd19a5ae253371019752a0624997.tar.bz2 |
Reland r50834
TBR=tony@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50837 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/sandboxed_extension_unpacker.cc')
-rw-r--r-- | chrome/browser/extensions/sandboxed_extension_unpacker.cc | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index ab72325..eda5e3f 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -34,8 +34,7 @@ SandboxedExtensionUnpacker::SandboxedExtensionUnpacker( SandboxedExtensionUnpackerClient* client) : crx_path_(crx_path), temp_path_(temp_path), thread_identifier_(ChromeThread::ID_COUNT), - rdh_(rdh), client_(client), got_response_(false), - force_web_origin_override_(false) { + rdh_(rdh), client_(client), got_response_(false) { } void SandboxedExtensionUnpacker::Start() { @@ -276,29 +275,6 @@ DictionaryValue* SandboxedExtensionUnpacker::RewriteManifestFile( static_cast<DictionaryValue*>(manifest.DeepCopy())); final_manifest->SetString(extension_manifest_keys::kPublicKey, public_key_); - if (final_manifest->HasKey(extension_manifest_keys::kApp)) { - bool has_web_origin = - final_manifest->Get(extension_manifest_keys::kWebOrigin, NULL); - if (force_web_origin_override_) { - if (has_web_origin) { - ReportFailure("Error: untrusted extension should have no web_origin."); - return NULL; - } - if (!web_origin_override_.is_valid() || - web_origin_override_.SchemeIsFile()) { - ReportFailure( - "Error: untrusted extension has an invalid download origin."); - return NULL; - } - - final_manifest->SetString(extension_manifest_keys::kWebOrigin, - web_origin_override_.spec()); - } else if (!has_web_origin) { - ReportFailure("Error: trusted extension should have a web_origin."); - return NULL; - } - } - std::string manifest_json; JSONStringValueSerializer serializer(&manifest_json); serializer.set_pretty_print(true); |