summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/extension_resource.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert r50779 as it breaks memory testshclam@chromium.org2010-06-251-4/+2
| | | | | | | | | TBR=asargent@chromium.org TEST=Tree goes green Review URL: http://codereview.chromium.org/2812025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50828 0039d316-1c4b-4281-b951-d872f2087c98
* Show extension icons next to their top-level context menu items.asargent@chromium.org2010-06-241-2/+4
| | | | | | | | | | | | | | | Also fix a bug in extension icon caching where we weren't keeping track of potential resizing done by ImageLoadingTracker before setting the cached SkBitmap. BUG=39494 TEST=Install an extension that includes an icon and uses the experimental context menu API. You should see the extension's icon in the context menu next to its top-level item. Review URL: http://codereview.chromium.org/2867008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50779 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure DecodeIcon is only called from the File thread.finnur@chromium.org2010-04-061-4/+8
| | | | | | | | | BUG=38521 TEST=None, Chrome should work as before. Review URL: http://codereview.chromium.org/1525009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43751 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure all callers to GetFilePath are on the File threadfinnur@chromium.org2010-03-251-4/+23
| | | | | | | | | | | by DCHECKing based on the thread type. TEST=Extensions and automated tests should work as before BUG=http://crbug.com/38521 Review URL: http://codereview.chromium.org/1293001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42578 0039d316-1c4b-4281-b951-d872f2087c98
* Eliminate all UI thread decoding of extension images. finnur@chromium.org2010-03-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | Except one, that is. We have one location we need to take a look at (I've added a comment). This changelist converts UI usage of DecodeImage on the UI thread to a revamped and simplified ImageLoadingTracker class. I plan on adding to GetFilePath a DCHECK for the File thread but decided to do so in another changelist, since it has a high likelyhood of flushing something out and be backed out because of that. This started out as issue 38521 (make infobar use cached icons) but grew in scope to just eliminate all UI thread access to DecodeImage and GetFilePath. BUG=http://crbug.com/38521 TEST=None (extensions should work as before) Review URL: http://codereview.chromium.org/1075006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42471 0039d316-1c4b-4281-b951-d872f2087c98
* Removing unnecessary includes.mad@chromium.org2010-01-281-4/+1
| | | | | | | | | BUG=0 TEST=none Review URL: http://codereview.chromium.org/549186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37378 0039d316-1c4b-4281-b951-d872f2087c98
* Extensions: file handling clean up.estade@chromium.org2009-12-181-1/+0
| | | | | | | | | | | | | | | - remove various invalid uses of ASCII functions - properly escape resource requests - clean up file path handling Some work remains to be done on the last bullet point but this is enough to fix the bug. BUG=30509 TEST=see bug Review URL: http://codereview.chromium.org/501046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34923 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily disable resource fallback for ExtensionResource::GetFilePath. We ↵cira@chromium.org2009-11-111-16/+1
| | | | | | | | | | | | need to figure out how to make it faster. We'll use chrome.extension.getURL(chrome.i18n.getMessage("resource")) for now to implement fallback. BUG=27359 Review URL: http://codereview.chromium.org/385045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31720 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of FilePath::AppendAndResolveRelative().mad@chromium.org2009-10-281-7/+21
| | | | | | | | | | | | | | To resolve the problem of '..' parent references as well as symbolic links on POSIX platforms, we can simply use the file_util::AbsolutePath() function. This has the drawback of having a different behavior on Windows and POSIX platforms, in the way that it can return a canonical path that doesn't exists when ran on Windows, but it will return an empty path (or false) when run on a POSIX platform. So we need to add an extra PathExists() call to unify the behavior. BUG=25681,25131 Review URL: http://codereview.chromium.org/343003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30334 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug where many extensions don't install due to sandbox.aa@chromium.org2009-10-271-1/+1
| | | | | | | | | | | | | | FWIW, I tracked down why our tests didn't find this. We do have coverage for the code path that was getting executed, but the sandbox is disabled in our browser tests, so it did not expose this issue. BUG=25865 TEST=Install any extension that has a content script or icons (test/data/extensions/good.crx is one example). Go to chrome://extensions/. You should see the extension successfully installed. Review URL: http://codereview.chromium.org/337041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30282 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 30149 - The existing file_util::AbsolutePath() function was already ↵tim@chromium.org2009-10-271-11/+7
| | | | | | | | | | | | | doing what we needed to do in the ExtensionResource class. BUG= http://crbug.com/25681 & http://crbug.com/25131 Review URL: http://codereview.chromium.org/334028 TBR=mad@chromium.org Review URL: http://codereview.chromium.org/335042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30152 0039d316-1c4b-4281-b951-d872f2087c98
* The existing file_util::AbsolutePath() function was already doing what we ↵mad@chromium.org2009-10-271-7/+11
| | | | | | | | | | needed to do in the ExtensionResource class. BUG= http://crbug.com/25681 & http://crbug.com/25131 Review URL: http://codereview.chromium.org/334028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30149 0039d316-1c4b-4281-b951-d872f2087c98
* Loading local resources uses improved fallback algorithm.cira@chromium.org2009-10-221-8/+14
| | | | | | | | | | | | | | | | Before: _locales/current_locale/rel_path, then extension root/rel_path Now: _locales/{current_locale, parents}/rel_path, then extension root/rel_path This change syncs local resource loading with catalog loading algo. BUG=12131 Review URL: http://codereview.chromium.org/316013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29815 0039d316-1c4b-4281-b951-d872f2087c98
* Minimize dependency of user scripts.mad@chromium.org2009-10-201-48/+24
| | | | | | | | | | | And made some minor lint fixes and code refactoring on the way, based on CR comments of previous attempt. BUG=none TEST=Make sure that the extension resources can still be properly localized and that they also load correctly when they are not localized. Review URL: http://codereview.chromium.org/267051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29512 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up ExtensionResource::CombinePathsSafely so that it can handle paths ↵dmaclach@chromium.org2009-10-191-1/+7
| | | | | | | | | | | with .. in them safely. BUG=25131 TEST=Build unit_tests on Mac with default build location that contains a .. in the path. Review URL: http://codereview.chromium.org/295001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29383 0039d316-1c4b-4281-b951-d872f2087c98
* Loads local resources from current locale subtree if available, if not it ↵cira@chromium.org2009-10-071-0/+100
falls back to extension subtree. We look for ext_root/foo/bar.js under ext_root/_locales/fr/foo/bar.js if current locale is fr. If there is no fr specific resource we load ext_root/foo/bar.js instead. Lots of small refactoring to replace FilePath with ExtensionResource. BUG=12131 TEST=See unittest for sample tree. Review URL: http://codereview.chromium.org/256022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28333 0039d316-1c4b-4281-b951-d872f2087c98