|
|
Chromium Code Reviews|
Created:
8 years, 5 months ago by thorogood Modified:
8 years, 5 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. |
DescriptionAdds the optional suggestedName to the chooseFile fileSystem API call.
BUG=
TEST=
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146771
Patch Set 1 #
Total comments: 6
Patch Set 2 : suggested_path => suggested_name, plus BaseName fix #
Total comments: 2
Patch Set 3 : comment fix for benwells@ #Patch Set 4 : sync to HEAD #
Messages
Total messages: 21 (0 generated)
https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:247: : suggested_path_(suggested_path), Nit: change suggested_path here to suggested_name. https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:375: FilePath suggested_path; Nit: suggested_name https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:394: suggested_path = FilePath::FromUTF8Unsafe(*options->suggested_name.get()) We should just use BaseName, so if an extension tries to put in a complete path the directory information would be stripped.
https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:247: : suggested_path_(suggested_path), On 2012/07/12 08:23:33, benwells wrote: > Nit: change suggested_path here to suggested_name. Done, and I've changed it in a few other places in this file. https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:375: FilePath suggested_path; On 2012/07/12 08:23:33, benwells wrote: > Nit: suggested_name Done. https://chromiumcodereview.appspot.com/10696188/diff/1/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:394: suggested_path = FilePath::FromUTF8Unsafe(*options->suggested_name.get()) On 2012/07/12 08:23:33, benwells wrote: > We should just use BaseName, so if an extension tries to put in a complete path > the directory information would be stripped. Done. BaseName may still return an absolute path if the path is a root path name. So if an app says suggestedName: '/', then we'd end up always opening the user in the root folder (and similar on Windows for C:\, D:\ etc). I've added a check for this too which just clears the name.
lgtm https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:398: // result in a relative path, but in some cases may not be. Clear the nit: ...cases may not.
LGTM
https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... File chrome/browser/extensions/api/file_system/file_system_api.cc (right): https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... chrome/browser/extensions/api/file_system/file_system_api.cc:398: // result in a relative path, but in some cases may not be. Clear the On 2012/07/12 08:48:01, benwells wrote: > nit: ...cases may not. Done.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10696188/7001
On 2012/07/13 01:15:22, thorogood wrote: > https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... > File chrome/browser/extensions/api/file_system/file_system_api.cc (right): > > https://chromiumcodereview.appspot.com/10696188/diff/4/chrome/browser/extensi... > chrome/browser/extensions/api/file_system/file_system_api.cc:398: // result in a > relative path, but in some cases may not be. Clear the > On 2012/07/12 08:48:01, benwells wrote: > > nit: ...cases may not. > > Done.
Try job failure for 10696188-7001 (retry) on win_rel for step "browser_tests". It's a second try, previously, step "browser_tests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
On 2012/07/13 03:04:20, I haz the power (commit-bot) wrote: > Try job failure for 10696188-7001 (retry) on win_rel for step "browser_tests". > It's a second try, previously, step "browser_tests" failed. > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&nu...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10696188/7001
Try job failure for 10696188-7001 (retry) on linux_rel for step "browser_tests". It's a second try, previously, step "browser_tests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
On 2012/07/13 03:55:03, I haz the power (commit-bot) wrote: > Try job failure for 10696188-7001 (retry) on linux_rel for step "browser_tests". > It's a second try, previously, step "browser_tests" failed. > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10696188/6003
Try job failure for 10696188-6003 (retry) on linux_rel for step "browser_tests". It's a second try, previously, steps "browser_tests, check_deps" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
On 2012/07/13 05:52:41, I haz the power (commit-bot) wrote: > Try job failure for 10696188-6003 (retry) on linux_rel for step "browser_tests". > It's a second try, previously, steps "browser_tests, check_deps" failed. > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10696188/6003
Try job failure for 10696188-6003 (retry) (retry) on linux_rel for step "browser_tests". It's a second try, previously, step "browser_tests" failed. http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
On 2012/07/13 15:46:00, I haz the power (commit-bot) wrote: > Try job failure for 10696188-6003 (retry) (retry) on linux_rel for step > "browser_tests". > It's a second try, previously, step "browser_tests" failed. > http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thorogood@chromium.org/10696188/6003
Change committed as 146771 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
