summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 00:47:53 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-28 00:47:53 +0000
commitaf1277b79f621b307fbcff76768cd7a225841e9e (patch)
tree8cbe5589ac40b88021b81acc79fd8ba87285c236 /chrome/common
parent42ac182f04f9c950e867491d0b233dbeecfe56f0 (diff)
downloadchromium_src-af1277b79f621b307fbcff76768cd7a225841e9e.zip
chromium_src-af1277b79f621b307fbcff76768cd7a225841e9e.tar.gz
chromium_src-af1277b79f621b307fbcff76768cd7a225841e9e.tar.bz2
Pull a SandboxedExtensionUnpacker out of ExtensionsService.
Review URL: http://codereview.chromium.org/160145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension.h1
-rw-r--r--chrome/common/extensions/extension_unpacker.cc4
2 files changed, 3 insertions, 2 deletions
diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h
index debdab9..7b2e12e 100644
--- a/chrome/common/extensions/extension.h
+++ b/chrome/common/extensions/extension.h
@@ -145,6 +145,7 @@ class Extension {
std::string* error);
const FilePath& path() const { return path_; }
+ void set_path(const FilePath& path) { path_ = path; }
const GURL& url() const { return extension_url_; }
const Location location() const { return location_; }
void set_location(Location location) { location_ = location; }
diff --git a/chrome/common/extensions/extension_unpacker.cc b/chrome/common/extensions/extension_unpacker.cc
index d3839a9..c2dffc4 100644
--- a/chrome/common/extensions/extension_unpacker.cc
+++ b/chrome/common/extensions/extension_unpacker.cc
@@ -119,7 +119,7 @@ bool ExtensionUnpacker::Run() {
parsed_manifest_.reset(ReadManifest());
if (!parsed_manifest_.get())
return false; // Error was already reported.
-
+
// NOTE: Since the Unpacker doesn't have the extension's public_id, the
// InitFromValue is allowed to generate a temporary id for the extension.
// ANY CODE THAT FOLLOWS SHOULD NOT DEPEND ON THE CORRECT ID OF THIS
@@ -160,7 +160,7 @@ bool ExtensionUnpacker::DumpImagesToFile() {
// static
bool ExtensionUnpacker::ReadImagesFromFile(const FilePath& extension_path,
DecodedImages* images) {
- FilePath path = extension_path.DirName().AppendASCII(kDecodedImagesFilename);
+ FilePath path = extension_path.AppendASCII(kDecodedImagesFilename);
std::string file_str;
if (!file_util::ReadFileToString(path, &file_str))
return false;