diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 06:46:21 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-04 06:46:21 +0000 |
commit | d2817019145d7806d400ae70bf9fb4b5681905c8 (patch) | |
tree | 21cf799953ab964c5d089bdb519b86bae4823269 /chrome/browser/extensions/sandboxed_extension_unpacker.cc | |
parent | a3a63ff836382403dc681befbd1cc866e8e5c117 (diff) | |
download | chromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.zip chromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.tar.gz chromium_src-d2817019145d7806d400ae70bf9fb4b5681905c8.tar.bz2 |
Implement first cut at the extension installation prompt on Windows.
Had to move set_path() earlier in the unpack process so that we would have real paths for the resources, so that we could load and display the icon in the ui.
This exposed a problem where page actions had absolute paths and other images in extensions had relative paths. Extension::GetBrowserImages() was expecting relative paths, and it just happened to work because in both cases Extension was initialized without a path.
Modified page actions to use relative paths to be consistent with other images.
Review URL: http://codereview.chromium.org/160516
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22368 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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/extensions/sandboxed_extension_unpacker.cc b/chrome/browser/extensions/sandboxed_extension_unpacker.cc index 46a8382..c736f39 100644 --- a/chrome/browser/extensions/sandboxed_extension_unpacker.cc +++ b/chrome/browser/extensions/sandboxed_extension_unpacker.cc @@ -119,6 +119,13 @@ void SandboxedExtensionUnpacker::OnUnpackExtensionSucceeded( // originals are gone for good. extension_.reset(new Extension); std::string manifest_error; + + // Update the path to refer to the temporary location. We do this because + // clients may want to use resources inside the extension before it is + // installed and they need the correct path. For example, the install UI shows + // one of the icons from the extension. + extension_->set_path(extension_root_); + if (!extension_->InitFromValue(*final_manifest, true, // require id &manifest_error)) { ReportFailure(std::string("Manifest is invalid: ") + |