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

Issue 10784007: Place source URL of DownloadFile in extended attributes (Closed)

Created:
8 years, 5 months ago by cristian.patrasciuc
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

Added functionality such that on Linux, after downloading a file, the source URL and referrer URL are stored as extended file attributes. Also see http://www.freedesktop.org/wiki/CommonExtendedAttributes BUG=45903 TEST=content_unittests/file_metadata_unittest_linux.cc/FileMetadataLinuxTest Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148729

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 2

Patch Set 5 : #

Total comments: 4

Patch Set 6 : #

Patch Set 7 : #

Total comments: 1

Patch Set 8 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+247 lines, -0 lines) Patch
M content/browser/download/base_file.cc View 1 2 3 4 5 6 7 3 chunks +5 lines, -0 lines 0 comments Download
A content/browser/download/file_metadata_linux.h View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
A content/browser/download/file_metadata_linux.cc View 1 2 3 4 5 6 7 1 chunk +43 lines, -0 lines 2 comments Download
A content/browser/download/file_metadata_unittest_linux.cc View 1 2 3 4 5 6 7 1 chunk +165 lines, -0 lines 2 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 31 (0 generated)
cristian.patrasciuc
Preliminary review request. Besides possible code issues or style problems, some things that I'm not ...
8 years, 5 months ago (2012-07-15 21:29:21 UTC) #1
Randy Smith (Not in Mondays)
Ben, as downloads linux expert (:-}), would you be willing to take a look at ...
8 years, 5 months ago (2012-07-15 21:33:45 UTC) #2
benjhayden
On 2012/07/15 21:29:21, cristian.patrasciuc wrote: > Preliminary review request. > > Besides possible code issues ...
8 years, 5 months ago (2012-07-16 15:26:38 UTC) #3
benjhayden
On 2012/07/16 15:26:38, benjhayden_chromium wrote: > On 2012/07/15 21:29:21, cristian.patrasciuc wrote: > > Preliminary review ...
8 years, 5 months ago (2012-07-16 17:32:10 UTC) #4
benjhayden
Please see https://chromiumcodereview.appspot.com/10790013 patch set 3 for one way to avoid the compile error. I'm ...
8 years, 5 months ago (2012-07-16 20:24:21 UTC) #5
benjhayden
Looks like this will also fail on ext file systems unless they're mounted with -o ...
8 years, 5 months ago (2012-07-17 17:22:15 UTC) #6
cristian.patrasciuc
Is there a standard way to disable a test programatically? Regarding the new lines at ...
8 years, 5 months ago (2012-07-17 18:04:50 UTC) #7
benjhayden
On 2012/07/17 18:04:50, cristian.patrasciuc wrote: > Is there a standard way to disable a test ...
8 years, 5 months ago (2012-07-17 18:49:51 UTC) #8
Randy Smith (Not in Mondays)
On 2012/07/17 18:49:51, benjhayden_chromium wrote: > On 2012/07/17 18:04:50, cristian.patrasciuc wrote: > > Is there ...
8 years, 5 months ago (2012-07-18 18:12:38 UTC) #9
cristian.patrasciuc
I uploaded a new patch that should fix the above mentioned issues.
8 years, 5 months ago (2012-07-19 17:20:16 UTC) #10
benjhayden
On 2012/07/19 17:20:16, cristian.patrasciuc wrote: > I uploaded a new patch that should fix the ...
8 years, 5 months ago (2012-07-19 19:56:02 UTC) #11
cristian.patrasciuc
I didn't read carefully the man page of setxattr in case of disabled extended attributes. ...
8 years, 5 months ago (2012-07-19 21:11:51 UTC) #12
cristian.patrasciuc
I also have to specify a namespace for the test attribute, otherwise it will always ...
8 years, 5 months ago (2012-07-19 21:25:06 UTC) #13
benjhayden
A couple nits. The trybots are almost done and looking good so far. http://codereview.chromium.org/10790013/ http://codereview.chromium.org/10784007/diff/25007/content/browser/file_metadata_unittest_linux.cc ...
8 years, 5 months ago (2012-07-20 17:20:04 UTC) #14
cristian.patrasciuc
I added a new patch with the changes you requested.
8 years, 5 months ago (2012-07-23 09:29:58 UTC) #15
benjhayden
lgtm
8 years, 5 months ago (2012-07-23 17:04:44 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cristian.patrasciuc@gmail.com/10784007/18003
8 years, 5 months ago (2012-07-23 17:04:52 UTC) #17
commit-bot: I haz the power
Presubmit check for 10784007-18003 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 5 months ago (2012-07-23 17:04:58 UTC) #18
benjhayden
Darin, can we have a rubberstamp? On 2012/07/23 17:04:58, I haz the power (commit-bot) wrote: ...
8 years, 5 months ago (2012-07-23 17:08:49 UTC) #19
darin (slow to review)
https://chromiumcodereview.appspot.com/10784007/diff/18003/content/browser/file_metadata_linux.h File content/browser/file_metadata_linux.h (right): https://chromiumcodereview.appspot.com/10784007/diff/18003/content/browser/file_metadata_linux.h#newcode13 content/browser/file_metadata_linux.h:13: namespace file_metadata { nit: why is this in content/browser/ ...
8 years, 5 months ago (2012-07-24 05:00:04 UTC) #20
cristian.patrasciuc
https://chromiumcodereview.appspot.com/10784007/diff/18003/content/browser/file_metadata_linux.h File content/browser/file_metadata_linux.h (right): https://chromiumcodereview.appspot.com/10784007/diff/18003/content/browser/file_metadata_linux.h#newcode13 content/browser/file_metadata_linux.h:13: namespace file_metadata { There is already an implementation for ...
8 years, 5 months ago (2012-07-24 11:20:42 UTC) #21
darin (slow to review)
On Tue, Jul 24, 2012 at 4:20 AM, <cristian.patrasciuc@gmail.com> wrote: > > https://chromiumcodereview.**appspot.com/10784007/diff/** > 18003/content/browser/file_**metadata_linux.h<https://chromiumcodereview.appspot.com/10784007/diff/18003/content/browser/file_metadata_linux.h> ...
8 years, 5 months ago (2012-07-24 20:18:44 UTC) #22
cristian.patrasciuc
I moved the files to content/browser/download. For the MAC-related ones I'll create a separate CL ...
8 years, 5 months ago (2012-07-25 10:42:09 UTC) #23
darin (slow to review)
https://chromiumcodereview.appspot.com/10784007/diff/28001/content/browser/download/file_metadata_linux.h File content/browser/download/file_metadata_linux.h (right): https://chromiumcodereview.appspot.com/10784007/diff/28001/content/browser/download/file_metadata_linux.h#newcode13 content/browser/download/file_metadata_linux.h:13: namespace file_metadata { nit: this shouldn't be in its ...
8 years, 5 months ago (2012-07-25 18:25:18 UTC) #24
cristian.patrasciuc
Since there is no content::download namespace yet and the classes from content/download are either in ...
8 years, 5 months ago (2012-07-26 10:06:43 UTC) #25
darin (slow to review)
LGTM https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/download/file_metadata_unittest_linux.cc File content/browser/download/file_metadata_unittest_linux.cc (right): https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/download/file_metadata_unittest_linux.cc#newcode22 content/browser/download/file_metadata_unittest_linux.cc:22: namespace { you can also put the test ...
8 years, 5 months ago (2012-07-26 18:47:00 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cristian.patrasciuc@gmail.com/10784007/29007
8 years, 5 months ago (2012-07-26 21:22:55 UTC) #27
commit-bot: I haz the power
Try job failure for 10784007-29007 (retry) on linux_clang for step "compile" (clobber build). It's a ...
8 years, 5 months ago (2012-07-26 21:47:29 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cristian.patrasciuc@gmail.com/10784007/29007
8 years, 4 months ago (2012-07-27 06:43:48 UTC) #29
commit-bot: I haz the power
Change committed as 148729
8 years, 4 months ago (2012-07-27 08:03:56 UTC) #30
Paweł Hajdan Jr.
8 years, 3 months ago (2012-08-29 16:17:14 UTC) #31
https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/do...
File content/browser/download/file_metadata_linux.cc (right):

https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/do...
content/browser/download/file_metadata_linux.cc:25: DPLOG(ERROR)
How about returning bool success value, and letting the caller handle it?

https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/do...
content/browser/download/file_metadata_linux.cc:32:
DCHECK(file_util::PathIsWritable(file));
Same here. You should return bool, and return false when path is not writable.

Same with "silent" error handling below. The rationale is that now this became a
part of the API, and once this has more callers, the problem becomes harder to
repair.

https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/do...
File content/browser/download/file_metadata_unittest_linux.cc (right):

https://chromiumcodereview.appspot.com/10784007/diff/29007/content/browser/do...
content/browser/download/file_metadata_unittest_linux.cc:117: if
(!is_xattr_supported()) return;
nit: Each statement should be on its own line. Please move the return to new
line, same below.

Powered by Google App Engine
This is Rietveld 408576698