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

Issue 15896035: File system API: whitelist the Downloads dir on Chrome OS. (Closed)

Created:
7 years, 6 months ago by hshi1
Modified:
7 years, 6 months ago
CC:
chromium-reviews, tzik+watch_chromium.org, Aaron Boodman, kinuko+watch, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

File system API: whitelist the Downloads dir on Chrome OS. Due to crrev.com/203393 we now blacklist the user data dir in DoCheckWritableFile(). However, on Chrome OS the user Downloads folder (~/Downloads) is a subdirectory of the user data dir and serves the role of local storage. This should be writable for file system API. BUG=246339 TEST=verified Downloads folder is writable by v2 apps on Chrome OS. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=203919

Patch Set 1 #

Patch Set 2 : Instead of opening the entire user data dir, just whitelist the Downloads dir. #

Patch Set 3 : ApiTest. #

Total comments: 2

Patch Set 4 : Address Sam's comments. Confirmed test passing on chromeos. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -5 lines) Patch
M chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 chunks +28 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_apitest.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
hshi1
benwells@ - PTAL (OWNER) sammc@ - FYI
7 years, 6 months ago (2013-06-03 22:48:55 UTC) #1
hshi1
Note that trybots are all failing now (infrastructure issues? bots failing with credential errors), but ...
7 years, 6 months ago (2013-06-03 22:55:51 UTC) #2
Matt Perry
I assume that ChromeOS has other protections against someone overwriting a file in the user-data-dir? ...
7 years, 6 months ago (2013-06-03 23:04:33 UTC) #3
hshi1
On 2013/06/03 23:04:33, Matt Perry wrote: > I assume that ChromeOS has other protections against ...
7 years, 6 months ago (2013-06-03 23:15:47 UTC) #4
hshi1
PTAL Patch Set #2. I have decided to apply a whitelist specifically for the Downloads ...
7 years, 6 months ago (2013-06-03 23:47:52 UTC) #5
Sam McNally
Please add a test for a file in a blacklisted and whitelisted path.
7 years, 6 months ago (2013-06-04 01:09:00 UTC) #6
hshi1
On 2013/06/04 01:09:00, Sam McNally wrote: > Please add a test for a file in ...
7 years, 6 months ago (2013-06-04 01:18:23 UTC) #7
Sam McNally
lgtm https://codereview.chromium.org/15896035/diff/19001/chrome/browser/extensions/api/file_system/file_system_apitest.cc File chrome/browser/extensions/api/file_system/file_system_apitest.cc (right): https://codereview.chromium.org/15896035/diff/19001/chrome/browser/extensions/api/file_system/file_system_apitest.cc#newcode465 chrome/browser/extensions/api/file_system/file_system_apitest.cc:465: chrome::DIR_DEFAULT_DOWNLOADS_SAFE, test_file.DirName(), false)); Add ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded( chrome::DIR_USER_DATA, test_file.DirName(), false));
7 years, 6 months ago (2013-06-04 01:25:58 UTC) #8
hshi1
https://codereview.chromium.org/15896035/diff/19001/chrome/browser/extensions/api/file_system/file_system_apitest.cc File chrome/browser/extensions/api/file_system/file_system_apitest.cc (right): https://codereview.chromium.org/15896035/diff/19001/chrome/browser/extensions/api/file_system/file_system_apitest.cc#newcode465 chrome/browser/extensions/api/file_system/file_system_apitest.cc:465: chrome::DIR_DEFAULT_DOWNLOADS_SAFE, test_file.DirName(), false)); On 2013/06/04 01:25:58, Sam McNally wrote: ...
7 years, 6 months ago (2013-06-04 01:33:53 UTC) #9
benwells
lgtm
7 years, 6 months ago (2013-06-04 01:35:12 UTC) #10
benwells
and thanks for fixing so quickly!
7 years, 6 months ago (2013-06-04 01:35:27 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hshi@chromium.org/15896035/27001
7 years, 6 months ago (2013-06-04 01:36:42 UTC) #12
commit-bot: I haz the power
7 years, 6 months ago (2013-06-04 10:51:52 UTC) #13
Message was sent while issue was closed.
Change committed as 203919

Powered by Google App Engine
This is Rietveld 408576698