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

Issue 10821096: Use the virtual path to set the blob's mime type for CreateSnapshotFile (Closed)

Created:
8 years, 4 months ago by kinuko
Modified:
8 years, 4 months ago
Reviewers:
michaeln, tzik
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, kinuko+watch, jam, Lei Zhang, kmadhusu
Visibility:
Public.

Description

Use the virtual path to set the blob's mime type for CreateSnapshotFile, otherwise each FS implementation needs to name a temporary file with the same extension. platform_path might be just a cryptic temporary/cache file name. BUG=none TEST=existing tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149316

Patch Set 1 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -12 lines) Patch
M content/browser/fileapi/fileapi_message_filter.h View 2 chunks +8 lines, -2 lines 0 comments Download
M content/browser/fileapi/fileapi_message_filter.cc View 4 chunks +20 lines, -10 lines 1 comment Download

Messages

Total messages: 7 (0 generated)
kinuko
8 years, 4 months ago (2012-07-31 01:32:41 UTC) #1
kinuko
Can you take a look?
8 years, 4 months ago (2012-07-31 20:04:46 UTC) #2
tzik
LGTM.
8 years, 4 months ago (2012-07-31 20:15:05 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kinuko@chromium.org/10821096/5
8 years, 4 months ago (2012-07-31 22:03:19 UTC) #4
commit-bot: I haz the power
Change committed as 149316
8 years, 4 months ago (2012-07-31 23:32:05 UTC) #5
michaeln
ooops... apparently i forgot to publish this comment, just curious about the extra closure indirection. ...
8 years, 4 months ago (2012-08-01 00:12:46 UTC) #6
kinuko
8 years, 4 months ago (2012-08-01 00:16:56 UTC) #7
On 2012/08/01 00:12:46, michaeln wrote:
> ooops... apparently i forgot to publish this comment, just curious about the
> extra closure indirection.
> 
>
https://chromiumcodereview.appspot.com/10821096/diff/5/content/browser/fileap...
> File content/browser/fileapi/fileapi_message_filter.cc (right):
> 
>
https://chromiumcodereview.appspot.com/10821096/diff/5/content/browser/fileap...
> content/browser/fileapi/fileapi_message_filter.cc:682: FilePath::StringType
> extension = virtual_path.Extension();
> Based on the CL description, changing from 'platform_path' to 'virtual_path'
as
> the input to GetWellKnownMimeType makes sense. Is there a reason to add the
> layer of indirection with the register_file_callback? Do you anticipate other
> callers passing in different closures bound to different methods?

Maybe I should have added some comments, since Taiju asked the same q.  I just
maxed out the # of args for base::Bind templates.  I could change the max value
but for this small fix instead I added a small indirection.

Powered by Google App Engine
This is Rietveld 408576698