diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 23:53:28 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-31 23:53:28 +0000 |
commit | fc38935ac4b8feccfe596476c0624c81ba7f007b (patch) | |
tree | 8bcf1cd0664aabe7af775c433f216925f4010027 /chrome/browser/extensions/sandboxed_extension_unpacker.cc | |
parent | 1af419c0f92c04b62ff997de1117309076f4eb17 (diff) | |
download | chromium_src-fc38935ac4b8feccfe596476c0624c81ba7f007b.zip chromium_src-fc38935ac4b8feccfe596476c0624c81ba7f007b.tar.gz chromium_src-fc38935ac4b8feccfe596476c0624c81ba7f007b.tar.bz2 |
Enable experimental permissions for extensions from the store.
BUG=100895
Review URL: http://codereview.chromium.org/8423003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108039 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 | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 987eb8b..69dd6f9 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -20,7 +20,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_utility_messages.h" -#include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/extension_l10n_util.h" @@ -112,12 +111,13 @@ void RecordSuccessfulUnpackTimeHistograms( SandboxedExtensionUnpacker::SandboxedExtensionUnpacker( const FilePath& crx_path, ResourceDispatcherHost* rdh, + Extension::Location location, int creation_flags, SandboxedExtensionUnpackerClient* client) : crx_path_(crx_path), thread_identifier_(BrowserThread::ID_COUNT), rdh_(rdh), client_(client), got_response_(false), - creation_flags_(creation_flags) { + location_(location), creation_flags_(creation_flags) { } bool SandboxedExtensionUnpacker::CreateTempDirectory() { @@ -214,7 +214,7 @@ void SandboxedExtensionUnpacker::Start() { link_free_crx_path)); } else { // Otherwise, unpack the extension in this process. - ExtensionUnpacker unpacker(temp_crx_path); + ExtensionUnpacker unpacker(temp_crx_path, location_, creation_flags_); if (unpacker.Run() && unpacker.DumpImagesToFile() && unpacker.DumpMessageCatalogsToFile()) { OnUnpackExtensionSucceeded(*unpacker.parsed_manifest()); @@ -262,7 +262,9 @@ void SandboxedExtensionUnpacker::StartProcessOnIOThread( // Grant the subprocess access to the entire subdir the extension file is // in, so that it can unpack to that dir. host->set_exposed_dir(temp_crx_path.DirName()); - host->Send(new ChromeUtilityMsg_UnpackExtension(temp_crx_path)); + host->Send( + new ChromeUtilityMsg_UnpackExtension( + temp_crx_path, location_, creation_flags_)); } void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( @@ -296,7 +298,7 @@ void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( extension_ = Extension::Create( extension_root_, - Extension::INTERNAL, + location_, *final_manifest, Extension::REQUIRE_KEY | creation_flags_, &error); |