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

Issue 220037: Add kMDItemWhereFroms metadata attribute to downloaded files. Combine with qu... (Closed)

Created:
11 years, 3 months ago by pink (ping after 24hrs)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Paul Godavari, pam+watch_chromium.org, Ben Goodger (Google)
Visibility:
Public.

Description

Add kMDItemWhereFroms metadata attribute to downloaded files. Combine with quarantine utility function and move into chrome/browser/cocoa, since common/ is not the right place for browser code. BUG=22289 TEST=file downloading

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -117 lines) Patch
A chrome/browser/cocoa/file_metadata.h View 1 chunk +28 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/file_metadata.mm View 1 1 chunk +167 lines, -0 lines 0 comments Download
M chrome/browser/download/download_file.cc View 1 2 chunks +5 lines, -3 lines 0 comments Download
M chrome/chrome.gyp View 2 chunks +2 lines, -2 lines 0 comments Download
D chrome/common/quarantine_mac.h View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/common/quarantine_mac.mm View 1 chunk +0 lines, -90 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
pink (ping after 24hrs)
11 years, 3 months ago (2009-09-24 21:41:36 UTC) #1
Avi (use Gerrit)
http://codereview.chromium.org/220037/diff/1/4 File chrome/browser/download/download_file.cc (right): http://codereview.chromium.org/220037/diff/1/4#newcode31 Line 31: #include "chrome/browser/cocoa//file_metadata.h" //?
11 years, 3 months ago (2009-09-24 21:47:16 UTC) #2
Mark Mentovai
lgtm, if you're into patch-cest http://codereview.chromium.org/220037/diff/1/2 File chrome/browser/cocoa/file_metadata.mm (right): http://codereview.chromium.org/220037/diff/1/2#newcode17 Line 17: // As of ...
11 years, 3 months ago (2009-09-24 22:07:28 UTC) #3
pink (ping after 24hrs)
11 years, 3 months ago (2009-09-25 17:35:38 UTC) #4
Updated CL, please re-review.

http://codereview.chromium.org/220037/diff/1/2
File chrome/browser/cocoa/file_metadata.mm (right):

http://codereview.chromium.org/220037/diff/1/2#newcode37
Line 37: const GURL& referrer) {
On 2009/09/24 22:07:28, Mark Mentovai wrote:
> indento

Done.

http://codereview.chromium.org/220037/diff/1/2#newcode50
Line 50: static MDItemSetAttribute_type md_item_set_attributeL_func = NULL;
On 2009/09/24 22:07:28, Mark Mentovai wrote: 
> I have no idea what that L is doing there, though.

A side-effect of converting camelCase to underscores, complete with typo, copy
and pasted.

http://codereview.chromium.org/220037/diff/1/2#newcode56
Line 56: ::CFBundleGetBundleWithIdentifier(CFSTR("com.apple.Metadata"));
On 2009/09/24 22:07:28, Mark Mentovai wrote:
> Since we're moving this into Chromium code, we don't usually use ::.
> 
> Also, this will only work if the metadata bundle is already loaded (which it
> probably will be.)

Done.

http://codereview.chromium.org/220037/diff/1/2#newcode72
Line 72: MDItemRef md_item = ::MDItemCreate(NULL, (CFStringRef)file_path);
On 2009/09/24 22:07:28, Mark Mentovai wrote:
> scoped_cftyperef?
> 
> Also, casts should be C++-style in Chromium.  Line 90 too.

Done.

http://codereview.chromium.org/220037/diff/1/4
File chrome/browser/download/download_file.cc (right):

http://codereview.chromium.org/220037/diff/1/4#newcode31
Line 31: #include "chrome/browser/cocoa//file_metadata.h"
On 2009/09/24 21:47:16, Avi wrote:
> //?

Done.

Powered by Google App Engine
This is Rietveld 408576698