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

Issue 155266: Ensure proper paths when saving pages with no title (Closed)

Created:
11 years, 5 months ago by Paul Godavari
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews_googlegroups.com, Ben Goodger (Google)
Visibility:
Public.

Description

Ensure proper paths when saving pages with no title. When saving a page with no title, such as a text file, attempt to use a sane value for the save name by retrieving the last component of the URL (if one exists). This prevents the case where a page http://www.foo.com/a/path/name.txt is saved as file "http www" with extension type "foo.com a path name.txt". This change also makes the SavePackage code a little more flexible and simpler to test. BUG=none TEST=Covered by unittest. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=20432

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 1

Patch Set 7 : '' #

Patch Set 8 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+100 lines, -35 lines) Patch
M chrome/browser/download/save_package.h View 2 3 4 5 6 2 chunks +7 lines, -4 lines 0 comments Download
M chrome/browser/download/save_package.cc View 1 2 3 4 5 6 7 3 chunks +58 lines, -31 lines 0 comments Download
M chrome/browser/download/save_package_unittest.cc View 2 3 4 5 6 2 chunks +35 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Paul Godavari
No significant behavioral changes except for the first few lines of SavePackage::GetSuggestedNameForSaveAs, where we now ...
11 years, 5 months ago (2009-07-09 23:12:58 UTC) #1
brettw
http://codereview.chromium.org/155266/diff/15/1026 File chrome/browser/download/save_package_unittest.cc (right): http://codereview.chromium.org/155266/diff/15/1026#newcode236 Line 236: {FPL("http://www.foo.com/path/title.txt"), FPL("title.txt"), false}, Can you add a testcase ...
11 years, 5 months ago (2009-07-10 16:18:22 UTC) #2
Paul Godavari
On 2009/07/10 16:18:22, brettw wrote: > http://codereview.chromium.org/155266/diff/15/1026 > File chrome/browser/download/save_package_unittest.cc (right): > > http://codereview.chromium.org/155266/diff/15/1026#newcode236 > ...
11 years, 5 months ago (2009-07-10 19:50:51 UTC) #3
Paul Godavari
11 years, 5 months ago (2009-07-10 19:51:08 UTC) #4
brettw
On Fri, Jul 10, 2009 at 12:50 PM, <paul@chromium.org> wrote: > On 2009/07/10 16:18:22, brettw ...
11 years, 5 months ago (2009-07-10 20:50:19 UTC) #5
Paul Godavari
Updated.
11 years, 5 months ago (2009-07-10 22:16:26 UTC) #6
brettw
11 years, 5 months ago (2009-07-10 22:19:39 UTC) #7
LGTM

Powered by Google App Engine
This is Rietveld 408576698