Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Issue 340057: Add first-class support for user scripts (Closed)

Created:
11 years, 1 month ago by Aaron Boodman
Modified:
9 years, 6 months ago
Reviewers:
omattos, Matt Perry
CC:
chromium-reviews_googlegroups.com, abarth-chromium
Visibility:
Public.

Description

Add first-class support for user scripts by automatically converting them into extensions on install. BUG=22103 TEST=Install a user script (such as from userscripts.org). You should get the extension install UI and the script should show up in the extension management UI. It should also work, though some scripts use Firefox-specific APIs and those won't work in Chromium.

Patch Set 1 #

Patch Set 2 : cleanup #

Patch Set 3 : minor cleanup #

Total comments: 19

Patch Set 4 : newness #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+676 lines, -96 lines) Patch
M base/string_util.h View 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M base/string_util.cc View 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 3 chunks +34 lines, -10 lines 0 comments Download
A chrome/browser/extensions/convert_user_script.h View 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/extensions/convert_user_script.cc View 1 2 3 1 chunk +138 lines, -0 lines 0 comments Download
A chrome/browser/extensions/convert_user_script_unittest.cc View 1 chunk +89 lines, -0 lines 0 comments Download
M chrome/browser/extensions/crx_installer.h View 1 2 3 5 chunks +25 lines, -12 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 1 2 3 4 chunks +51 lines, -24 lines 0 comments Download
M chrome/browser/extensions/user_script_master.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/user_script_master.cc View 1 2 3 3 chunks +14 lines, -4 lines 0 comments Download
M chrome/browser/renderer_host/buffered_resource_handler.cc View 1 2 3 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.h View 1 2 3 3 chunks +16 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension.cc View 1 2 3 5 chunks +51 lines, -1 line 0 comments Download
M chrome/common/extensions/extension_constants.h View 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_constants.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/common/extensions/extension_error_utils.h View 1 chunk +9 lines, -7 lines 0 comments Download
M chrome/common/extensions/extension_error_utils.cc View 2 chunks +15 lines, -3 lines 0 comments Download
M chrome/common/extensions/user_script.h View 1 2 3 4 chunks +49 lines, -1 line 0 comments Download
M chrome/common/extensions/user_script.cc View 1 2 3 4 chunks +65 lines, -10 lines 0 comments Download
M chrome/common/extensions/user_script_unittest.cc View 1 2 3 2 chunks +34 lines, -0 lines 0 comments Download
M chrome/renderer/resources/greasemonkey_api.js View 1 chunk +12 lines, -0 lines 1 comment Download
M chrome/renderer/user_script_slave.h View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/renderer/user_script_slave.cc View 2 chunks +9 lines, -19 lines 0 comments Download
A chrome/test/data/extensions/user_script_basic.user.js View 1 chunk +11 lines, -0 lines 0 comments Download
A chrome/test/data/extensions/user_script_no_metadata.user.js View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Aaron Boodman
11 years, 1 month ago (2009-11-02 06:44:45 UTC) #1
omattos
On 2009/11/02 06:44:45, Aaron Boodman wrote: > though some scripts use Firefox-specific APIs Can we ...
11 years, 1 month ago (2009-11-02 21:21:16 UTC) #2
Aaron Boodman
On 2009/11/02 21:21:16, omattos wrote: > On 2009/11/02 06:44:45, Aaron Boodman wrote: > > though ...
11 years, 1 month ago (2009-11-02 22:08:54 UTC) #3
Matt Perry
very awesome. mostly LGTM http://codereview.chromium.org/340057/diff/51/1030 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/340057/diff/51/1030#newcode1250 Line 1250: if (Extension::HasExtensionFileExtension(full_path)) { It ...
11 years, 1 month ago (2009-11-02 23:15:04 UTC) #4
Aaron Boodman
Ok, ready for another look. Also added some stubs functions for unimplemented Greasemonkey APIs. http://codereview.chromium.org/340057/diff/51/1030 ...
11 years, 1 month ago (2009-11-03 20:08:45 UTC) #5
Matt Perry
11 years, 1 month ago (2009-11-03 20:21:29 UTC) #6
LGTM

http://codereview.chromium.org/340057/diff/4002/6023
File chrome/renderer/resources/greasemonkey_api.js (right):

http://codereview.chromium.org/340057/diff/4002/6023#newcode72
Line 72: console.log("adding apis");
remove log statements?

Powered by Google App Engine
This is Rietveld 408576698