Chromium Code Reviews
Help | Chromium Project | Sign in
(30)

Issue 3069018: Win: Don't give some downloads duplicate extensions like .arj.arj... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 10 months ago by Nico
Modified:
4 years ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, ben+cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Win: Don't give some downloads duplicate extensions like .arj.arj BUG=49621 TEST=See bug. Also unittests. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=54625

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -2 lines) Patch
M chrome/browser/views/shell_dialogs_win.cc View 1 2 3 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/views/shell_dialogs_win_unittest.cc View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 4 (0 generated)
Nico
This is maybe more complicated than it has to be, but since this is going ...
4 years, 10 months ago (2010-08-02 21:01:40 UTC) #1
Nico
Updated as per in-person review comments. Do you have an example where the new code ...
4 years, 10 months ago (2010-08-02 21:42:22 UTC) #2
Peter Kasting
LGTM http://codereview.chromium.org/3069018/diff/8001/9001 File chrome/browser/views/shell_dialogs_win.cc (right): http://codereview.chromium.org/3069018/diff/8001/9001#newcode45 chrome/browser/views/shell_dialogs_win.cc:45: // If the user didn't give us a ...
4 years, 10 months ago (2010-08-02 21:59:01 UTC) #3
Nico
4 years, 10 months ago (2010-08-02 22:14:54 UTC) #4
I also added a test that shows why this is different from patch set 1 in
http://codereview.chromium.org/2825010 (admittedly nothing that's likely to
happen in practice).

Then I added a test that checks that issue 7499, which weinjared wanted to fix,
is actually fixed -- it fails. I'm now confused. (Test:

TEST(AppendExtensionIfNeeded, EqualToExtension_UserCanOverrideExtension) {
  const std::wstring filename = L"product.reg";
  const std::wstring filter_selected = L"*.txt";
  const std::wstring suggested_ext = L"txt";

  const std::wstring actual_filename = AppendExtensionIfNeeded(filename,
      filter_selected, suggested_ext);

  ASSERT_EQ(L"product.reg", actual_filename);
}
)

Anyway, this CL fixes what I set out to fix, so I'll submit it and call it a
day.

http://codereview.chromium.org/3069018/diff/8001/9001
File chrome/browser/views/shell_dialogs_win.cc (right):

http://codereview.chromium.org/3069018/diff/8001/9001#newcode45
chrome/browser/views/shell_dialogs_win.cc:45: // If the user didn't give us a
known extension, and we wanted one, add it.
On 2010/08/02 21:59:01, Peter Kasting wrote:
> Nit: This comment might make more sense as:
> // If we wanted a specific extension, but the user's filename deleted it or
> changed it to something that the system doesn't understand, re-append it.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be