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/utility | |
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/utility')
-rw-r--r-- | chrome/utility/chrome_content_utility_client.cc | 10 | ||||
-rw-r--r-- | chrome/utility/chrome_content_utility_client.h | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/chrome/utility/chrome_content_utility_client.cc b/chrome/utility/chrome_content_utility_client.cc index 497ba56..d203c67 100644 --- a/chrome/utility/chrome_content_utility_client.cc +++ b/chrome/utility/chrome_content_utility_client.cc @@ -13,6 +13,7 @@ #include "chrome/browser/importer/profile_import_process_messages.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_utility_messages.h" +#include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_l10n_util.h" #include "chrome/common/extensions/extension_unpacker.h" #include "chrome/common/extensions/update_manifest.h" @@ -93,8 +94,13 @@ bool ChromeContentUtilityClient::Send(IPC::Message* message) { } void ChromeContentUtilityClient::OnUnpackExtension( - const FilePath& extension_path) { - ExtensionUnpacker unpacker(extension_path); + const FilePath& extension_path, int location, int creation_flags) { + CHECK(location > Extension::INVALID); + CHECK(location < Extension::NUM_LOCATIONS); + ExtensionUnpacker unpacker( + extension_path, + static_cast<Extension::Location>(location), + creation_flags); if (unpacker.Run() && unpacker.DumpImagesToFile() && unpacker.DumpMessageCatalogsToFile()) { Send(new ChromeUtilityHostMsg_UnpackExtension_Succeeded( diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h index fa419e0..4d6a752 100644 --- a/chrome/utility/chrome_content_utility_client.h +++ b/chrome/utility/chrome_content_utility_client.h @@ -48,7 +48,8 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient { virtual bool Send(IPC::Message* message); // IPC message handlers. - void OnUnpackExtension(const FilePath& extension_path); + void OnUnpackExtension(const FilePath& extension_path, + int location, int creation_flags); void OnUnpackWebResource(const std::string& resource_data); void OnParseUpdateManifest(const std::string& xml); void OnDecodeImage(const std::vector<unsigned char>& encoded_data); |