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

Issue 11198067: Move extension unpack intermediate dir to Extensions/Temp (Closed)

Created:
8 years, 2 months ago by James Cook
Modified:
8 years, 2 months ago
Reviewers:
Aaron Boodman
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Visibility:
Public.

Description

Move extension unpack intermediate dir to Extensions/Temp This speeds up extension installation on Chrome OS by about 20%. On Chrome OS the USER_DATA_DIR is in /home/chronos, which is a different file system than /home/chronos/user where the Extensions directory lives. Thus an attempt to rename() an extension into place ends up being a recursive directory copy, which is both non-atomic and slow. Also add code to clean up the intermediate directory during extension garbage collection, which might have lead to leaked files in the old code if Chrome crashed during extension install. Removed DIR_USER_DATA_TEMP as the extension install code was the only user. Just use a temp directory for this during tests so we don't have to worry about profile creation. BUG=155994 TEST=Manual testing of extension install speed on Chrome OS, unit_tests ExtensionFromWebApp.* ExtensionFromUserScript.* SandboxedUnpackerTest.* TBR=sky@chromium.org for removing an unused constant from chrome/common/chrome_paths.h Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=162880

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : fix windows #

Total comments: 2

Patch Set 4 : standardize names #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -113 lines) Patch
M chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/extensions/convert_user_script.h View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/convert_user_script.cc View 1 2 3 2 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/convert_user_script_unittest.cc View 1 2 3 10 chunks +30 lines, -7 lines 0 comments Download
M chrome/browser/extensions/convert_web_app.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/extensions/convert_web_app.cc View 1 2 3 1 chunk +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/convert_web_app_unittest.cc View 1 2 3 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/extensions/crx_installer.h View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/extensions/sandboxed_unpacker.h View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/extensions/sandboxed_unpacker.cc View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/extensions/sandboxed_unpacker_unittest.cc View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/common/chrome_paths.h View 1 1 chunk +0 lines, -7 lines 0 comments Download
M chrome/common/chrome_paths.cc View 1 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/common/extensions/extension_file_util.h View 1 2 3 2 chunks +6 lines, -9 lines 0 comments Download
M chrome/common/extensions/extension_file_util.cc View 1 2 3 5 chunks +36 lines, -59 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
James Cook
Aaron, PTAL. This is the directory move we chatted about. It touches a bunch of ...
8 years, 2 months ago (2012-10-18 18:23:28 UTC) #1
Aaron Boodman
Cool change. Please make the naming changes consistently throughout. http://codereview.chromium.org/11198067/diff/7002/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc File chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc (right): http://codereview.chromium.org/11198067/diff/7002/chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc#newcode150 chrome/browser/chromeos/kiosk_mode/kiosk_mode_screensaver.cc:150: ...
8 years, 2 months ago (2012-10-18 21:11:12 UTC) #2
James Cook
Aaron, PTAL. I standardized on "extensions_dir" and GetInstallTempDir().
8 years, 2 months ago (2012-10-18 21:43:54 UTC) #3
Aaron Boodman
lgtm, good change
8 years, 2 months ago (2012-10-18 22:23:14 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamescook@chromium.org/11198067/5006
8 years, 2 months ago (2012-10-18 22:45:10 UTC) #5
commit-bot: I haz the power
8 years, 2 months ago (2012-10-19 01:16:36 UTC) #6
Change committed as 162880

Powered by Google App Engine
This is Rietveld 408576698