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

Issue 20504: I'm expanding this to fix a couple of bugs in determining the file name for... (Closed)

Created:
11 years, 10 months ago by sky
Modified:
9 years, 7 months ago
Reviewers:
tony
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

I'm expanding this to fix a couple of bugs in determining the file name for dragging images: . It's possible for the extension to be empty, resulting in a bad file name, for example, 'foo.' or just '.'. . We weren't restricting the size of the file to MAX_PATH. . We weren't removing characters that are invalid for file system names. It's possible to put this code up in OSExchangeData rather than here, but it feels best to centralize it here so that we don't have to worry about bad file names leaking into other code. I tried hard to write a layout test for this, but it seems we don't really use the file name in test shell so that I couldn't get coverage. BUG=7023 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=10206

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 1

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -5 lines) Patch
M third_party/WebKit/WebCore/platform/chromium/ClipboardChromium.h View 2 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/WebCore/platform/chromium/ClipboardChromium.cpp View 1 2 1 chunk +6 lines, -5 lines 0 comments Download
A third_party/WebKit/WebCore/platform/chromium/ClipboardChromiumLinux.cpp View 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/WebCore/platform/chromium/ClipboardChromiumMac.cpp View 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/WebCore/platform/chromium/ClipboardChromiumWin.cpp View 1 chunk +56 lines, -0 lines 0 comments Download
M webkit/build/WebCore/SConscript View 2 1 chunk +1 line, -0 lines 0 comments Download
M webkit/build/WebCore/WebCore.vcproj View 2 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/webkit.xcodeproj/project.pbxproj View 4 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
sky
11 years, 10 months ago (2009-02-19 20:47:26 UTC) #1
tony
The code looks fine, but if we're going to validate the filename on windows, I ...
11 years, 10 months ago (2009-02-20 00:22:09 UTC) #2
tony
11 years, 10 months ago (2009-02-20 02:15:44 UTC) #3
Yes, this is what I was expecting.  LGTM!

http://codereview.chromium.org/20504/diff/7/8
File third_party/WebKit/WebCore/platform/chromium/ClipboardChromium.cpp (right):

http://codereview.chromium.org/20504/diff/7/8#newcode46
Line 46: #include <shlwapi.h>
Nit: can you remove this now?

Powered by Google App Engine
This is Rietveld 408576698