summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/user_script_master.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move StringPiece into the base namespace. It is collidingtony@chromium.org2009-09-101-13/+13
| | | | | | | | | | with the StringPiece class in icu4.2, which is a problem when trying to use the system version of icu. Review URL: http://codereview.chromium.org/193072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
* Load extensions that have their manifest in the Prefs on the UI thread.mpcomplete@chromium.org2009-08-211-11/+7
| | | | | | | | | | | | | | | | There is some migration code for loading old extensions which we do on the UI thread as well, for simplicity. This will only happen the first time the user starts Chrome, so I think it's OK. Also cleaned up the EXTENSIONS_LOADED notification to send out a single extension, instead of a 1-element list of extensions. BUG=18293 TEST=loading extensions should still work Review URL: http://codereview.chromium.org/174208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23997 0039d316-1c4b-4281-b951-d872f2087c98
* Lands <http://codereview.chromium.org/165297> for thiago.farina@gmail.com.hbono@chromium.org2009-08-191-1/+1
| | | | | | | | | | | | | | R=me From Thiago: Replaces some TrimWhitespace with TrimWhitespaceASCII or TrimWhitespaceUTF8. BUG=9851 TEST=run base_unittests.exe, unit_tests.exe and ui_tests.exe Review URL: http://codereview.chromium.org/172039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23703 0039d316-1c4b-4281-b951-d872f2087c98
* vector.end() is out of range, need to erase (end() - 1)jnd@chromium.org2009-08-091-24/+15
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/165045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22886 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Check the return value of file_util::ReadFileToString. It's ↵jhawkins@chromium.org2009-08-031-4/+13
| | | | | | | | | | | possible that the file will be removed from the filesystem inbetween the enumeration and reading of the file. In this instance, the script is removed from the script list. CID=3888 BUG=none TEST=none Review URL: http://codereview.chromium.org/159680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22258 0039d316-1c4b-4281-b951-d872f2087c98
* Coverity: Pass FilePaths by reference.jhawkins@chromium.org2009-07-241-1/+2
| | | | | | | | | CID=2696 BUG=none TEST=none Review URL: http://codereview.chromium.org/159353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21567 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug where content scripts are not run if they are inaa@chromium.org2009-06-221-1/+1
| | | | | | | | extensions that are loaded after EXTENSIONS_READY. Review URL: http://codereview.chromium.org/140065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18903 0039d316-1c4b-4281-b951-d872f2087c98
* Abstract ExtensionPrefs into their own class.erikkay@google.com2009-06-181-1/+9
| | | | | | | | | Relands http://codereview.chromium.org/126281 which had been reverted due to a leak. The only difference is in extension_prefs.h where extension_data_ is now a scoped_ptr. Review URL: http://codereview.chromium.org/131040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18717 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r18661.willchan@chromium.org2009-06-181-9/+1
| | | | | | | | Broke purify and mac valgrind. "Pull Extension-related prefs into its own class. Also add a notification for when the extensions service has finished its initial load of extensions, separate from EXTENSIONS_LOADED.TEST=noneBUG=none" Review URL: http://codereview.chromium.org/132008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18682 0039d316-1c4b-4281-b951-d872f2087c98
* Pull Extension-related prefs into its own class. Also add a notification ↵erikkay@google.com2009-06-171-1/+9
| | | | | | | | for when the extensions service has finished its initial load of extensions, separate from EXTENSIONS_LOADED.TEST=noneBUG=none Review URL: http://codereview.chromium.org/126281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18661 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce header dependencies in chrome/browser/phajdan.jr@chromium.org2009-06-161-0/+5
| | | | | | | | In my scan of headers I got up to browser/gtk/ Review URL: http://codereview.chromium.org/126131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18500 0039d316-1c4b-4281-b951-d872f2087c98
* Remove unused code from ExtensionsService.mpcomplete@google.com2009-05-261-1/+1
| | | | | | | | Move extension.* from browser to common, so it can be included by the utility process. Review URL: http://codereview.chromium.org/115716 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16880 0039d316-1c4b-4281-b951-d872f2087c98
* Update renderers when there are zero user scripts.aa@chromium.org2009-05-261-3/+1
| | | | | | | | | | | | | Commit: http://codereview.chromium.org/113733 BUG=12170 TEST=Enable user scripts and create one. See that it runs. Now delete it. See that it does not run! Review URL: http://codereview.chromium.org/113741 Patch from Ted Crossman <tedoc2000@gmail.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16864 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-211-0/+56
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16676 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Hook up more of extension uninstall."aa@chromium.org2009-05-211-56/+0
| | | | | | | | This reverts commit ebb5f616663f9d5ee78584187da16bba4ce96811. Review URL: http://codereview.chromium.org/113680 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16557 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-201-0/+56
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16547 0039d316-1c4b-4281-b951-d872f2087c98
* TBR: Revert "Hook up more of extension uninstall."aa@chromium.org2009-05-201-56/+0
| | | | | | | | This reverts commit 5b2fc12fbca26b20ed4176ac740c58fe49360c4a. Review URL: http://codereview.chromium.org/113664 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16538 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up more of extension uninstall.aa@chromium.org2009-05-201-0/+56
| | | | | | | | | | | Also removed all external dependencies from ExtensionsService. It now only sends out notifications, which other services consume. This should allow us to unit test the ExtensionsService frontend, but I haven't added that yet. Review URL: http://codereview.chromium.org/113493 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16529 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for almost-recursive watches in Linux DirectoryWatcherphajdan.jr@chromium.org2009-05-141-1/+5
| | | | | | | | | | | | | | | | | After this patch DirectoryWatcher when asked for recursive watch will scan the subtree and add inotify watches for each subfolder, but further changes to the tree structure won't trigger adding/removing watches. Support for really recursive watches is planned. This is just to divide the work, because the task is not easy. Based on patch by Janwar Dinata <j.dinata@gmail.com> reviewed at http://codereview.chromium.org/92151 http://crbug.com/8968 Review URL: http://codereview.chromium.org/115229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16070 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_vector.h and stl_util-inl.h to base/ben@chromium.org2009-05-051-1/+1
| | | | | | | | http://crbug.com/11387 Review URL: http://codereview.chromium.org/107001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15272 0039d316-1c4b-4281-b951-d872f2087c98
* Enable user_script_master_unittest for Mac since DirectoryWatcher was ported.shess@chromium.org2009-05-011-4/+4
| | | | | | | | [See http://crbug.com/10967 ] Review URL: http://codereview.chromium.org/99280 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15099 0039d316-1c4b-4281-b951-d872f2087c98
* Switching things to FilePath:phajdan.jr@chromium.org2009-04-071-1/+1
| | | | | | | | | | | | | | | | Remove following deprecated wstring-using functions: net/net_util: FilePathToFileURL net/net_util: FileURLToFilePath Switch net/base/upload_data to FilePath. Switch upload-related parts of net/url_request/url_request to FilePath. Made necessary adjustments in rest of code (a lot). Review URL: http://codereview.chromium.org/63011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13242 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/42382georged@chromium.org2009-03-191-9/+10
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12074 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/42288georged@chromium.org2009-03-181-44/+81
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12016 0039d316-1c4b-4281-b951-d872f2087c98
* Port DirectoryWatcher to Linux using inotify.phajdan.jr@chromium.org2009-03-181-1/+1
| | | | | | Review URL: http://codereview.chromium.org/42037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11962 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes CRLF and trailing white spaces.maruel@chromium.org2009-03-051-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
* Coalesce more hardcoded schemes to using predefined constants.brettw@chromium.org2009-02-261-5/+2
| | | | | | Review URL: http://codereview.chromium.org/31008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10437 0039d316-1c4b-4281-b951-d872f2087c98
* Create the extensions (<Profile>/Extensions) and user script (<Profile>/User ↵rafaelw@chromium.org2009-02-211-0/+4
| | | | | | | | Scripts) directories during start up if they don't already exists Review URL: http://codereview.chromium.org/29001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10134 0039d316-1c4b-4281-b951-d872f2087c98
* Add early-injection capability to user scripts.aa@chromium.org2009-02-141-0/+8
| | | | | | Review URL: http://codereview.chromium.org/19624 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9822 0039d316-1c4b-4281-b951-d872f2087c98
* Optionally support URLPatterns in standalone useraa@chromium.org2009-02-101-16/+35
| | | | | | | | | | | scripts via the @match declaration. In the future, maybe @include will be deprecated and result in a warning. Review URL: http://codereview.chromium.org/20127 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9526 0039d316-1c4b-4281-b951-d872f2087c98
* Integrate URLPattern with Extension user scripts.aa@chromium.org2009-02-051-27/+23
| | | | | | | | | | Also refactored the UserScript class in UserScriptSlave and the UserScriptInfo structure in UserScriptMaster into a common location. Review URL: http://codereview.chromium.org/21070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9270 0039d316-1c4b-4281-b951-d872f2087c98
* Remove most header file dependencies on the notification type list. It isbrettw@chromium.org2009-02-011-1/+2
| | | | | | | | | | | really painful to add more types, since lots of headers include the notification service to derive from the notification observer. This splits that out, so much less of the project should end up including notification_types.h ---Paths modified but not in any changelist: Review URL: http://codereview.chromium.org/19744 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9020 0039d316-1c4b-4281-b951-d872f2087c98
* Re-enable the NoScript unittest.mpcomplete@google.com2009-01-291-2/+0
| | | | | | | | Turns out we need to broadcast the NOTIFY_USER_SCRIPTS_LOADED message even if there are no scripts. I just removed the DCHECK that expects scripts. Review URL: http://codereview.chromium.org/19475 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8913 0039d316-1c4b-4281-b951-d872f2087c98
* Fix DCHECK when handling NOTIFY_USER_SCRIPTS_LOADED by not broadcasting thempcomplete@chromium.org2009-01-291-0/+2
| | | | | | | | message if we don't have any scripts. Review URL: http://codereview.chromium.org/19441 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8851 0039d316-1c4b-4281-b951-d872f2087c98
* Add user script support to extensions.aa@chromium.org2009-01-251-47/+73
| | | | | | | | | | | | | | | This is implemented mostly by relying on the existing user script code. But since extension user scripts are declared, not discovered in a directory, I had to add support for adding 'lone' user scripts to UserScriptMaster. This led to a bit of refactoring. Note that this CL relies on: http://codereview.chromium.org/18352 Review URL: http://codereview.chromium.org/18198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8614 0039d316-1c4b-4281-b951-d872f2087c98
* Try again to commit r8486, which updates the manifestaa@chromium.org2009-01-231-1/+4
| | | | | | | | | | | | | | | | | | | | | | | parsing in the Extension class to also parse out user script details. The problem was that extension_protocols.cc appears to link OK if you don't refer to anything in it, but as soon as you try to use something defined in it, a bunch of other symbols it refers to turn up undefined. To avoid this problem in the future, I stopped compiling extensions_protocol.cc so that we would realize if we tried to use it. Also in this change, I absolutified paths in ExtensionsService before creating Extension instances. On Linux, the path that PathService was giving us was not absolute. Review URL: http://codereview.chromium.org/18704 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8576 0039d316-1c4b-4281-b951-d872f2087c98
* Move parsing of metadata header into browser process. This is a prerequisiteaa@chromium.org2009-01-171-57/+64
| | | | | | | | | | to getting user scripts working in extensions because extensions won't express their metadata using the UserScript header, so parsing can't be done in the renderer. Review URL: http://codereview.chromium.org/18308 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8249 0039d316-1c4b-4281-b951-d872f2087c98
* This is a rename of the term 'Greasemonkey' to 'user script' in Chromium.aa@chromium.org2009-01-091-0/+219
I'm doing this to avoid confusion with the Firefox version of Greasemonkey and also because 'user script' is really the correct generic term. At the same time, I also moved user_script_master* into extensions/ because I want these two pieces to get closer and closer such that standalone user scripts are just a very small extension. Also extensions will be relying on most of the user script code. Review URL: http://codereview.chromium.org/17281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7827 0039d316-1c4b-4281-b951-d872f2087c98