summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add --allow-scripting-gallery command line switch to allow extensionssdoyon@chromium.org2010-07-091-1/+3
| | | | | | | | | | | | | | | and scripts to run on the Chrome Extensions Gallery site. There are security concerns in enabling this and so it remains off by default, but this is needed for automation testing of the gallery. Cleanup: Have UserScriptSlave::InjectScripts() return void instead of a bogus bool. TEST=Visit http://chrome.google.com/extensions, check that content scripts work when the command-line switch is given, and are not injected when the switch is not given. BUG=none Review URL: http://codereview.chromium.org/2912002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51977 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for omnibox.onInputStarted and onInputCancelled.mpcomplete@chromium.org2010-07-021-3/+3
| | | | | | | | | | | | Also fix a bug where we'd keep an extension's old keyword even if it changed on upgrade/reload. BUG=46475 BUG=48091 Review URL: http://codereview.chromium.org/2807033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51540 0039d316-1c4b-4281-b951-d872f2087c98
* Add the concept of browse extent.aa@chromium.org2010-07-011-1/+1
| | | | | | | | BUG=46636 Review URL: http://codereview.chromium.org/2862034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51327 0039d316-1c4b-4281-b951-d872f2087c98
* Re-implement app overlap detection with new extent syntax.aa@chromium.org2010-06-261-1/+5
| | | | | | | | BUG=47445 Review URL: http://codereview.chromium.org/2876009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50929 0039d316-1c4b-4281-b951-d872f2087c98
* Reworked ExtensionsService::AddPendingExtension().akalin@chromium.org2010-06-261-32/+63
| | | | | | | | | | | | | | | Made it take options for enabled/incognito enabled state to apply on install. BUG=46515 TEST=unittests, manual (newly-synced disabled extensions should stay disabled) Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50804 Review URL: http://codereview.chromium.org/2819023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50918 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed memory leak in ExtensionsService.akalin@chromium.org2010-06-251-3/+6
| | | | | | | | | | | Added coverage for disabled extensions in unit tests. BUG=none TEST=new unit tests Review URL: http://codereview.chromium.org/2845025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50910 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r50834aa@chromium.org2010-06-251-11/+3
| | | | | | TBR=tony@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50837 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r50834aa@chromium.org2010-06-251-3/+11
| | | | | | TBR=tony@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50835 0039d316-1c4b-4281-b951-d872f2087c98
* Allow multiple domains in app.aa@chromium.org2010-06-251-11/+3
| | | | | | | | | | | | | | | | | | | | | Subsequent changes will: * Allow URLPatterns to specify * for scheme, so that http/https doesn't need to be repeated for each host. * Fix the overlap detection. Suggested review order: - test files - url_pattern* - extension_extent* - extension* - everything else BUG=46633 Review URL: http://codereview.chromium.org/2876007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50834 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r50804 "Reworked ExtensionsService::AddPendingExtension()."hclam@chromium.org2010-06-251-63/+32
| | | | | | | | Reverted r50804 as it seems to be related to memory error. Review URL: http://codereview.chromium.org/2833033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50832 0039d316-1c4b-4281-b951-d872f2087c98
* Reworked ExtensionsService::AddPendingExtension().akalin@chromium.org2010-06-251-32/+63
| | | | | | | | | | | | | Made it take options for enabled/incognito enabled state to apply on install. BUG=46515 TEST=unittests, manual (newly-synced disabled extensions should stay disabled) Review URL: http://codereview.chromium.org/2819023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50804 0039d316-1c4b-4281-b951-d872f2087c98
* Only examine host & path in gallery download url checkrafaelw@chromium.org2010-06-241-15/+32
| | | | | | | | | BUG=47425 TEST=All tests pass Review URL: http://codereview.chromium.org/2867024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50786 0039d316-1c4b-4281-b951-d872f2087c98
* Require user opt-in before allowing content script injection on file URLs.mpcomplete@chromium.org2010-06-241-0/+37
| | | | | | | | BUG=47180 Review URL: http://codereview.chromium.org/2809034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50737 0039d316-1c4b-4281-b951-d872f2087c98
* Reland - Only allow installation of extensions/apps with gallery update url ↵rafaelw@chromium.org2010-06-231-1/+1
| | | | | | | | | | | | | | via download from gallery original review here: http://codereview.chromium.org/2855009 BUG=45542 TEST=NONE TBR=aa Review URL: http://codereview.chromium.org/2872013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50571 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50333 - Only allow installation of extensions/apps with gallery ↵tkent@chromium.org2010-06-211-1/+1
| | | | | | | | | | | | | | | | update url via download from gallery Because of multiple failures of unit_tests and interactive_ui_tests. BUG=45542 TEST=NONE Review URL: http://codereview.chromium.org/2855009 TBR=rafaelw@chromium.org Review URL: http://codereview.chromium.org/2822021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50334 0039d316-1c4b-4281-b951-d872f2087c98
* Only allow installation of extensions/apps with gallery update url via ↵rafaelw@chromium.org2010-06-211-1/+1
| | | | | | | | | | | download from gallery BUG=45542 TEST=NONE Review URL: http://codereview.chromium.org/2855009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50333 0039d316-1c4b-4281-b951-d872f2087c98
* Re-apply r50278.aa@chromium.org2010-06-191-6/+6
| | | | | | | BUG=46632 TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50314 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r50278.aa@chromium.org2010-06-181-6/+6
| | | | | | TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50284 0039d316-1c4b-4281-b951-d872f2087c98
* Some app-related manifest cleanup:aa@chromium.org2010-06-181-6/+6
| | | | | | | | | | | | | | | | | | 1) Group app-related keys under a new "app" key, and change the implementation of IsApp() to just check that. 2) Rename IsApp() and IsTheme() -> is_app(), is_theme() to match style guide. 3) Remove web_content.enabled. That was a stupid idea. 4) Make some kind of launch URL required for apps. BUG=46632 Review URL: http://codereview.chromium.org/2836012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50278 0039d316-1c4b-4281-b951-d872f2087c98
* Send WINDOW_ID_NONE in chrome.windows.onFocusChanged when all windows loose ↵rafaelw@chromium.org2010-06-161-1/+1
| | | | | | | | | | | | | focus. Note that this patch includes support for Views (Windows/chromeos) and GTK (Linux). I was going to do mac as well, but decided my objective-c skillz were too rusty. BUG=32932 TEST=none Review URL: http://codereview.chromium.org/2778001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49884 0039d316-1c4b-4281-b951-d872f2087c98
* Send event on changes to the cookie monster.jochen@chromium.org2010-06-101-0/+2
| | | | | | | | | BUG=38398 TEST=*.CookiesEvents Review URL: http://codereview.chromium.org/2703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49390 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent installation of an app if its web extent overlaps another installed app.mpcomplete@chromium.org2010-06-031-6/+17
| | | | | | | | BUG=41280 Review URL: http://codereview.chromium.org/2469004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48886 0039d316-1c4b-4281-b951-d872f2087c98
* First pass at experimental omnibox API. There are plenty of rough edges and ↵mpcomplete@chromium.org2010-05-281-3/+13
| | | | | | | | | | | | | | | features to work on, but it's in a usable state. When an extension is installed that specifies an omnibox keyword in its manifest, we add that keyword to the user's list of Search Engines. The user can then edit this keyword later. I'm leveraging most of the original search engine keyword code. An extension keyword has a special URL that identifies it as an extension keyword. There is some special case code to treat these keywords slightly differently throughout the omnibox code. BUG=38884 Review URL: http://codereview.chromium.org/2078021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48503 0039d316-1c4b-4281-b951-d872f2087c98
* Allow extensions to be overinstalled with extensions of sameaa@chromium.org2010-05-191-81/+35
| | | | | | | | | | | | | | | | | | | | | | version. This is useful during development, for switching themes, and for user scripts (since user scripts have no development mode). Since we can't always immediately delete the version directory for an extension after unloading it (because some files might be in use), this required changing the directory layout of the extensions directory to allow multiple copies of the same version of the same extension to be present at once. This was done by adding a counter to the version directory name. Also get rid of all the old "Current Version" cruft, since we no longer use that. BUG=26538 Review URL: http://codereview.chromium.org/1521039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47740 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land r47079: Shorten several appsrelated flags.aa@chromium.org2010-05-131-1/+1
| | | | | | TBR=rafaelw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47104 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 47079 - Shorten several appsrelated flags. "256 characters should be ↵aa@chromium.org2010-05-121-1/+1
| | | | | | | | | | | enough for anyone's shortcut flags!" Review URL: http://codereview.chromium.org/1991009 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/2010013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47081 0039d316-1c4b-4281-b951-d872f2087c98
* Shorten several apps-related flags. "256 characters should be enough for ↵aa@chromium.org2010-05-121-1/+1
| | | | | | | | anyone's shortcut flags!" Review URL: http://codereview.chromium.org/1991009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47079 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the gallery url passed through the command line to be referrer for ↵finnur@chromium.org2010-05-121-0/+12
| | | | | | | | | | | actual gallery downloads. BUG=None TEST=Pass in a gallery url through the command line and make sure the dangerous download warning does not show when downloading from that gallery. Review URL: http://codereview.chromium.org/1997019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@47033 0039d316-1c4b-4281-b951-d872f2087c98
* Changing a NOTREACHED to a DLOG(ERROR) since we hit this when running the ↵tommi@chromium.org2010-05-061-1/+1
| | | | | | | | | | | | | net tests with chrome frame. See revision 42240 for more details: http://codereview.chromium.org/1107013 TEST=n/a BUG=none Review URL: http://codereview.chromium.org/1987001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46577 0039d316-1c4b-4281-b951-d872f2087c98
* Changing linux platform for chromeos. This involved moving platform_util ↵dhg@chromium.org2010-04-291-1/+1
| | | | | | | | | | and extension_error_reporter to browser, so that the UIs surrounding them can be in the browser. BUG=none TEST=none Review URL: http://codereview.chromium.org/1705009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45986 0039d316-1c4b-4281-b951-d872f2087c98
* Adding ExtensionPrefs methods for storing update-when-idle data.asargent@chromium.org2010-04-271-18/+0
| | | | | | | | | | | | | | | | This includes adding a few methods to ExtensionPrefs that I'm going to need to use inside ExtensionUpdater for implementing the "do updates at idle" feature. Instead of adding more call-through stubs to the interface that ExtensionsService providers to the ExtensionUpdater, I instead decided it was time to do some refactoring to expose a ExtensionPrefs getter in the interface. TEST=(Should be covered by unit/browser tests) BUG=37971 Review URL: http://codereview.chromium.org/1695018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45738 0039d316-1c4b-4281-b951-d872f2087c98
* Start up extension event routers later in BrowserMain, sohuanr@chromium.org2010-04-151-14/+8
| | | | | | | | | | | | | | | | | | | bookmarks is loaded after bookmark import in first run. I am not familiar with the extension code. It seems currently ExtensionHistoryEventRouter and ExtensionAccessibilityEventRouter are always initialized while ExtensionBrowserEventRouter and ExtensionBookmarkEventRouter are initialized on demand. Since we have a build in bookmark manager extension, I start all event routers by default in this change. Let me know if this is an issue. BUG=40144 TEST=chrome.exe --first-run Review URL: http://codereview.chromium.org/1578032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44668 0039d316-1c4b-4281-b951-d872f2087c98
* Fix errors in ExtensionPrefs with storing the blacklist last ping day.asargent@chromium.org2010-04-061-0/+8
| | | | | | | | | | | | | | | | | | This moves where we were storing the blacklist last ping day so that we aren't storing an invalid extension id in the prefs, and adds code to keep invalid ids from being stored. It also removes some warnings in cases that aren't errors, and finally adds some unit tests for extension_prefs to try and keep similar problems from happening in the future. BUG=40017 TEST=Should not get any DCHECK failures in Debug builds when you do an extension update manually (via the chrome://extensions page) and then restart the browser. Review URL: http://codereview.chromium.org/1596008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43782 0039d316-1c4b-4281-b951-d872f2087c98
* detect preferences errorserikkay@chromium.org2010-04-061-1/+4
| | | | | | | | | BUG=38352 TEST=none Review URL: http://codereview.chromium.org/1120006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43715 0039d316-1c4b-4281-b951-d872f2087c98
* Makes tab contents look for extension whose extent contains thesky@chromium.org2010-04-011-2/+10
| | | | | | | | | | | current url and fetches the smallish icon if the extension is found. BUG=none TEST=none Review URL: http://codereview.chromium.org/1576006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43345 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up extension apps notification permission, take tworafaelw@chromium.org2010-03-311-30/+20
| | | | | | | | | | | | | | | This is the chromium side of a change which will wait to land on the webkit side landing. (https://bugs.webkit.org/show_bug.cgi?id=36625) It changes the NotificationPresenter to pass the sourceURL, rather than the SecurityOrigin in checking permission. The full URL is required to match the app extent. BUG=32361, 31024 TEST=NONE Review URL: http://codereview.chromium.org/1383001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43162 0039d316-1c4b-4281-b951-d872f2087c98
* Send ping days parameter for extension blacklist update checksasargent@chromium.org2010-03-301-1/+2
| | | | | | | | | | BUG=39745 TEST=Extension update in general, and blacklisting, should still work normally. Review URL: http://codereview.chromium.org/1540003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43142 0039d316-1c4b-4281-b951-d872f2087c98
* Changed AddPendingExtension() to treat adding an already-installedakalin@chromium.org2010-03-291-0/+2
| | | | | | | | | | | extension as an error. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/1517001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42997 0039d316-1c4b-4281-b951-d872f2087c98
* Rework ordering in ExtensionsService::UninstallExtension()jochen@chromium.org2010-03-261-10/+16
| | | | | | | | | | BUG=39147 TEST=Existing tests in extensions_service_unittest.cc Review URL: http://codereview.chromium.org/1278003 Patch from Mattias Nissler. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42752 0039d316-1c4b-4281-b951-d872f2087c98
* Added support for pending extensions to ExtensionsService andakalin@chromium.org2010-03-261-4/+80
| | | | | | | | | | | | | | | ExtensionUpdater. This is needed for theme syncing. Basically a pending extension is an (id, update_url) pair. This change makes it so that one can pass pending extensions to the extension service and they will be installed if necessary on the next auto-update cycle. BUG=32414 TEST=unittests, trybots, in-progress theme syncing change Review URL: http://codereview.chromium.org/1232003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42711 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r42467. Clear cookies, local storage and databases when an extension ↵jochen@chromium.org2010-03-251-0/+13
| | | | | | | | | | | | gets uninstalled. BUG=27938,39177 TEST=Unittest in extension_service_unitttest.cc Review URL: http://codereview.chromium.org/1257005 Patch from Mattias Nissler. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42611 0039d316-1c4b-4281-b951-d872f2087c98
* Reverts 42520 and 42477. It back red again when adding this change back.maruel@chromium.org2010-03-251-13/+0
| | | | | | | | | | TEST=valgrind test: unit should turn green BUG=38398 BUG=39177 Review URL: http://codereview.chromium.org/1313003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42569 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 42467 by reverting 42499 and added suppression.maruel@chromium.org2010-03-241-0/+13
| | | | | | | | | | | "Clear cookies, local storage and databases when an extension gets uninstalled." BUG=39177 BUG=38398 Review URL: http://codereview.chromium.org/1210004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42520 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r42467: "Clear cookies, local storage and databases when an extension ↵maruel@chromium.org2010-03-241-13/+0
| | | | | | | | | | | | gets uninstalled." It introduced a memory leak, causing a regression on valgrind test: unit. TBR=jochen Review URL: http://codereview.chromium.org/1295001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42499 0039d316-1c4b-4281-b951-d872f2087c98
* Clear cookies, local storage and databases when an extension gets uninstalled.jochen@chromium.org2010-03-241-0/+13
| | | | | | | | | | BUG=27938 TEST=Unittest in extension_service_unitttest.cc Review URL: http://codereview.chromium.org/1095003 Patch from Mattias Nissler. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42467 0039d316-1c4b-4281-b951-d872f2087c98
* Fix 2 bugs related to remembering loaded unpacked extensions.mpcomplete@chromium.org2010-03-231-8/+16
| | | | | | | | | | | | | - Extension disabled infobar was being shown at startup. - Crashed extensions were persisted as unpacked extensions, regardless of how they were installed. BUG=30116 BUG=38856 Review URL: http://codereview.chromium.org/1157005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42394 0039d316-1c4b-4281-b951-d872f2087c98
* ChromeFrame net tests would crash on startup while initializing the ↵ananta@chromium.org2010-03-221-1/+4
| | | | | | | | | | | | | extensions service. The crash occured while dereferencing a NULL manifest. Fix is to check for the same and avoid initializing the extension if we don't have a manifest. TBR=aa Review URL: http://codereview.chromium.org/1107013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42240 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up the extensions service after fixing the bug.phajdan.jr@chromium.org2010-03-221-17/+1
| | | | | | | | | | | | | This removes excessive debugging code I added to gather more info about the crashes. They have now disappeared, and the checks obscure the code now. TEST=extension browser tests, unit_tests, etc BUG=30405 Review URL: http://codereview.chromium.org/1078006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42221 0039d316-1c4b-4281-b951-d872f2087c98
* Resubmit 1025006: Refactor app-related manifest propertiesaa@chromium.org2010-03-191-11/+2
| | | | | | | | so that they don't include the name 'app'. TBR=erikkay@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42146 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 42091 - Refactor apprelated manifest properties so that they don'tandybons@chromium.org2010-03-191-2/+11
| | | | | | | | | | | | | | | include the name 'app'. I think these will be useful for normal extensions, too. Also extract an ExtensionExtent class out of Extension. I think this will be useful for passing by value to the IO thread. Review URL: http://codereview.chromium.org/1025006 TBR=aa@chromium.org Review URL: http://codereview.chromium.org/1120005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42104 0039d316-1c4b-4281-b951-d872f2087c98