diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 23:15:02 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 23:15:02 +0000 |
commit | facd7a7651cf81da7fbe48596be7f4324ff86ab8 (patch) | |
tree | 21c25659a8feb5fff0c93856211e27e9ee830514 /chrome/common/extensions/extension.cc | |
parent | cc7c1c77040c26a56de3eeb953f468ced2a32186 (diff) | |
download | chromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.zip chromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.tar.gz chromium_src-facd7a7651cf81da7fbe48596be7f4324ff86ab8.tar.bz2 |
Fix an issue where themes would sporadically fail to install.
Trying to send decoded images over IPC didn't work too well. Instead, we'll
write them to a file and have the browser slurp them in from there. My first
instinct was to use SharedMemory, but that would require us to impose a limit
on the size of the decoded image data.
Also made sure that the undecoded images are deleted when we install.
BUG=13455
TEST=Try the repro steps in bug 13455 several times and make sure it works
every time.
Review URL: http://codereview.chromium.org/119255
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17797 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/extensions/extension.cc')
-rw-r--r-- | chrome/common/extensions/extension.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index c641afc..ffed0d5 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -805,3 +805,25 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_id, return true; } + +std::set<FilePath> Extension::GetBrowserImages() { + std::set<FilePath> image_paths; + + DictionaryValue* theme_images = GetThemeImages(); + if (theme_images) { + for (DictionaryValue::key_iterator it = theme_images->begin_keys(); + it != theme_images->end_keys(); ++it) { + std::wstring val; + if (theme_images->GetString(*it, &val)) { + image_paths.insert(FilePath::FromWStringHack(val)); + } + } + } + + for (PageActionMap::const_iterator it = page_actions().begin(); + it != page_actions().end(); ++it) { + image_paths.insert(it->second->icon_path()); + } + + return image_paths; +} |