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

Issue 10692105: Updates file type selector for fileSystem API (Closed)

Created:
8 years, 5 months ago by thorogood
Modified:
8 years, 4 months ago
CC:
chromium-reviews, Aaron Boodman, kinuko+watch, mihaip-chromium-reviews_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Updates file type selector for fileSystem API Allows developers to explicitly specify what accept types they would like to allow in their file selectors, as well as whether they allow all files as a last option. BUG=133066 TEST=Test cases, manual testing Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=150515

Patch Set 1 #

Patch Set 2 : Experiment with IDL file; longer comments so it's clearer what the goal is #

Total comments: 6

Patch Set 3 : All code now inside file_system_api.cc #

Total comments: 13

Patch Set 4 : after benwells@' inline suggestions #

Patch Set 5 : Now with a basic test #

Total comments: 19

Patch Set 6 : Some method cleanups, test is now a unit test #

Total comments: 2

Patch Set 7 : Broken out suggested_name stuff, added test #

Total comments: 14

Patch Set 8 : More logic in GetDescriptionIdAndExtensions #

Patch Set 9 : forgot to upload suggested_extension fix #

Patch Set 10 : oops, over 80 chars #

Total comments: 13

Patch Set 11 : fixed args, need_suggestion bool #

Total comments: 5

Patch Set 12 : use find() instead of iter, remove own description generation code, cleanup tests #

Total comments: 20

Patch Set 13 : more unittests, nit fixes #

Total comments: 8

Patch Set 14 : three nits, one fix #

Patch Set 15 : added another test case #

Total comments: 1

Patch Set 16 : Mihai's suggestions #

Total comments: 2

Patch Set 17 : Merge to head #

Total comments: 5

Patch Set 18 : typedef, description fix, doc regen #

Patch Set 19 : sync to head #

Patch Set 20 : Fix wstring on Windows #

Patch Set 21 : wide characters in unittest #

Patch Set 22 : Fixed Windows test again #

Patch Set 23 : Remove another Windows test, fix later #

Patch Set 24 : Patch #23 broken #

Unified diffs Side-by-side diffs Delta from patch set Stats (+718 lines, -22 lines) Patch
M chrome/browser/extensions/api/file_system/file_system_api.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/file_system/file_system_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 12 chunks +146 lines, -22 lines 0 comments Download
A chrome/browser/extensions/api/file_system/file_system_api_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +187 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/extensions/api/file_system.idl View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +24 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/apps/fileSystem.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +173 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/extensions/fileSystem.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +173 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (0 generated)
thorogood
Hey Ben, can you look at the IDL file here? I've expanded the comments a ...
8 years, 5 months ago (2012-07-12 05:48:28 UTC) #1
thorogood
On 2012/07/12 05:48:28, thorogood wrote: > Hey Ben, can you look at the IDL file ...
8 years, 5 months ago (2012-07-12 05:49:14 UTC) #2
benwells
https://chromiumcodereview.appspot.com/10692105/diff/2001/chrome/common/extensions/api/file_system.idl File chrome/common/extensions/api/file_system.idl (right): https://chromiumcodereview.appspot.com/10692105/diff/2001/chrome/common/extensions/api/file_system.idl#newcode24 chrome/common/extensions/api/file_system.idl:24: DOMString? suggestedPath; Cool :) Feel free to do in ...
8 years, 5 months ago (2012-07-12 06:10:57 UTC) #3
thorogood
forgot to publish these comments. https://chromiumcodereview.appspot.com/10692105/diff/2001/chrome/common/extensions/api/file_system.idl File chrome/common/extensions/api/file_system.idl (right): https://chromiumcodereview.appspot.com/10692105/diff/2001/chrome/common/extensions/api/file_system.idl#newcode24 chrome/common/extensions/api/file_system.idl:24: DOMString? suggestedPath; On 2012/07/12 ...
8 years, 5 months ago (2012-07-13 04:17:26 UTC) #4
thorogood
Ben, I've implemented this now. PTAL. Some of this code is stolen/duplicated from other places ...
8 years, 5 months ago (2012-07-24 05:15:59 UTC) #5
benwells
I like the direction. Overall I would like to see: - break up the longer ...
8 years, 5 months ago (2012-07-24 06:01:27 UTC) #6
thorogood
I've addressed your inline comments, and I'll take a stab at breaking up the functions/unittesting ...
8 years, 5 months ago (2012-07-25 05:02:58 UTC) #7
thorogood
I've now added a basic test.
8 years, 5 months ago (2012-07-25 06:24:26 UTC) #8
benwells
https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode161 chrome/browser/extensions/api/file_system/file_system_api.cc:161: } I think the ParseAcceptValue function could be made ...
8 years, 5 months ago (2012-07-26 05:40:44 UTC) #9
thorogood
PTAL, I've tried to address most of your comments. https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode161 chrome/browser/extensions/api/file_system/file_system_api.cc:161: ...
8 years, 5 months ago (2012-07-26 07:39:05 UTC) #10
benwells
https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode161 chrome/browser/extensions/api/file_system/file_system_api.cc:161: } On 2012/07/26 07:39:05, thorogood wrote: > On 2012/07/26 ...
8 years, 5 months ago (2012-07-26 08:10:22 UTC) #11
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/15001/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode193 chrome/browser/extensions/api/file_system/file_system_api.cc:193: On 2012/07/26 08:10:23, benwells wrote: > On 2012/07/26 07:39:05, ...
8 years, 5 months ago (2012-07-27 03:14:38 UTC) #12
benwells
https://chromiumcodereview.appspot.com/10692105/diff/22003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/22003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode139 chrome/browser/extensions/api/file_system/file_system_api.cc:139: std::vector<std::string> ParseAcceptValue(const std::string& accept_types_) { Put a comment explaining ...
8 years, 5 months ago (2012-07-27 03:43:56 UTC) #13
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/22003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/22003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode139 chrome/browser/extensions/api/file_system/file_system_api.cc:139: std::vector<std::string> ParseAcceptValue(const std::string& accept_types_) { On 2012/07/27 03:43:56, benwells ...
8 years, 5 months ago (2012-07-27 04:49:55 UTC) #14
benwells
https://chromiumcodereview.appspot.com/10692105/diff/26002/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/26002/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode213 chrome/browser/extensions/api/file_system/file_system_api.cc:213: // We don't have a description ID; build a ...
8 years, 5 months ago (2012-07-27 05:59:24 UTC) #15
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/26002/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/26002/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode213 chrome/browser/extensions/api/file_system/file_system_api.cc:213: // We don't have a description ID; build a ...
8 years, 5 months ago (2012-07-27 06:21:23 UTC) #16
benwells
https://chromiumcodereview.appspot.com/10692105/diff/24003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/24003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode513 chrome/browser/extensions/api/file_system/file_system_api.cc:513: if (need_suggestion) { you can use find here instead ...
8 years, 5 months ago (2012-07-27 06:36:21 UTC) #17
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/24003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/24003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode213 chrome/browser/extensions/api/file_system/file_system_api.cc:213: // We don't have a description ID; build a ...
8 years, 5 months ago (2012-07-27 08:14:39 UTC) #18
benwells
Feels close https://chromiumcodereview.appspot.com/10692105/diff/17027/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/17027/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode139 chrome/browser/extensions/api/file_system/file_system_api.cc:139: // Parses a comma-seperated list of accept ...
8 years, 4 months ago (2012-07-30 01:07:16 UTC) #19
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/17027/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/17027/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode139 chrome/browser/extensions/api/file_system/file_system_api.cc:139: // Parses a comma-seperated list of accept types into ...
8 years, 4 months ago (2012-07-30 06:39:16 UTC) #20
benwells
https://chromiumcodereview.appspot.com/10692105/diff/21003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/21003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode156 chrome/browser/extensions/api/file_system/file_system_api.cc:156: bool GetFileTypesFromAcceptType(const std::string& accept_type, Nit: parameter list alignment. https://chromiumcodereview.appspot.com/10692105/diff/21003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode190 ...
8 years, 4 months ago (2012-07-30 07:19:32 UTC) #21
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/21003/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/21003/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode156 chrome/browser/extensions/api/file_system/file_system_api.cc:156: bool GetFileTypesFromAcceptType(const std::string& accept_type, On 2012/07/30 07:19:32, benwells wrote: ...
8 years, 4 months ago (2012-07-30 07:31:19 UTC) #22
Mihai Parparita -not on Chrome
https://chromiumcodereview.appspot.com/10692105/diff/28001/chrome/common/extensions/api/file_system.idl File chrome/common/extensions/api/file_system.idl (right): https://chromiumcodereview.appspot.com/10692105/diff/28001/chrome/common/extensions/api/file_system.idl#newcode27 chrome/common/extensions/api/file_system.idl:27: // by type. For example, <code>['image/*', 'text/html,.jso']</code> Apologies if ...
8 years, 4 months ago (2012-07-30 23:33:03 UTC) #23
benwells
On 2012/07/30 23:33:03, Mihai Parparita wrote: > https://chromiumcodereview.appspot.com/10692105/diff/28001/chrome/common/extensions/api/file_system.idl > File chrome/common/extensions/api/file_system.idl (right): > > https://chromiumcodereview.appspot.com/10692105/diff/28001/chrome/common/extensions/api/file_system.idl#newcode27 ...
8 years, 4 months ago (2012-07-31 00:40:29 UTC) #24
thorogood
On 2012/07/31 00:40:29, benwells wrote: > On 2012/07/30 23:33:03, Mihai Parparita wrote: > > > ...
8 years, 4 months ago (2012-07-31 00:42:41 UTC) #25
thorogood
On 2012/07/31 00:42:41, thorogood wrote: > On 2012/07/31 00:40:29, benwells wrote: > > On 2012/07/30 ...
8 years, 4 months ago (2012-07-31 04:01:32 UTC) #26
Mihai Parparita -not on Chrome
LGTM https://chromiumcodereview.appspot.com/10692105/diff/23003/chrome/browser/extensions/api/file_system/file_system_api.h File chrome/browser/extensions/api/file_system/file_system_api.h (right): https://chromiumcodereview.appspot.com/10692105/diff/23003/chrome/browser/extensions/api/file_system/file_system_api.h#newcode12 chrome/browser/extensions/api/file_system/file_system_api.h:12: namespace file_system = extensions::api::file_system; Namespace aliases aren't allowed ...
8 years, 4 months ago (2012-07-31 22:26:10 UTC) #27
benwells
https://chromiumcodereview.appspot.com/10692105/diff/27009/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/27009/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode171 chrome/browser/extensions/api/file_system/file_system_api.cc:171: if (description_id) { This logic is confusing, and probably ...
8 years, 4 months ago (2012-07-31 23:01:19 UTC) #28
thorogood
https://chromiumcodereview.appspot.com/10692105/diff/27009/chrome/browser/extensions/api/file_system/file_system_api.cc File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10692105/diff/27009/chrome/browser/extensions/api/file_system/file_system_api.cc#newcode171 chrome/browser/extensions/api/file_system/file_system_api.cc:171: if (description_id) { On 2012/07/31 23:01:19, benwells wrote: > ...
8 years, 4 months ago (2012-08-03 02:58:01 UTC) #29
benwells
lgtm
8 years, 4 months ago (2012-08-06 01:53:40 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/14006
8 years, 4 months ago (2012-08-06 01:54:58 UTC) #31
commit-bot: I haz the power
Presubmit check for 10692105-14006 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-06 01:55:02 UTC) #32
thorogood
+thakis, for top-level chrome/ folder: I've just added a test.
8 years, 4 months ago (2012-08-06 23:15:31 UTC) #33
Nico
chrome_tests.gypi change lgtm
8 years, 4 months ago (2012-08-07 00:01:41 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/14006
8 years, 4 months ago (2012-08-07 00:24:04 UTC) #35
commit-bot: I haz the power
Try job failure for 10692105-14006 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-07 02:04:18 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/14006
8 years, 4 months ago (2012-08-07 03:45:32 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/33002
8 years, 4 months ago (2012-08-07 07:12:20 UTC) #38
commit-bot: I haz the power
Try job failure for 10692105-33002 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-07 08:33:16 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/13014
8 years, 4 months ago (2012-08-07 08:52:14 UTC) #40
commit-bot: I haz the power
Try job failure for 10692105-13014 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-07 10:20:59 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/14009
8 years, 4 months ago (2012-08-07 23:56:27 UTC) #42
commit-bot: I haz the power
Try job failure for 10692105-14009 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-08 01:29:02 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/13022
8 years, 4 months ago (2012-08-08 03:40:03 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10692105/24029
8 years, 4 months ago (2012-08-08 06:42:18 UTC) #45
commit-bot: I haz the power
8 years, 4 months ago (2012-08-08 08:22:43 UTC) #46
Change committed as 150515

Powered by Google App Engine
This is Rietveld 408576698