New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 757073 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

User requested pages should have more user-friendly names

Project Member Reported by romax@chromium.org, Aug 18 2017

Issue description

As mentioned in the design doc for p2p sharing (go/offline-pages-p2p-sharing-infra), user-requested pages should have more discriminable names so that users can choose files more easily in 3rd-party apps.
 

Comment 1 by romax@chromium.org, Dec 21 2017

I think it's better to provide a utility method which will generate an unique file name given directory, url and title of the page.

Comment 2 by romax@chromium.org, Jan 30 2018

A more detailed design: go/offline-pages-filename-generation-base.

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 2 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/69ddcfd978c5a9574b2175cf772298dbde80640a

commit 69ddcfd978c5a9574b2175cf772298dbde80640a
Author: Yafei Duan <romax@chromium.org>
Date: Fri Feb 02 00:03:42 2018

Moving GetSuggestedNameForSaveAs to //components.

Creating a new components: filename_generation, which will be in charge
of filename generation based on title or url.

Moving GetSUggestedNameForSaveAs into the new component, along wit
some of the static methods only used by it. This method will be reused
by //components/offline_pages when generating filenames for pages saving
onto external downloads directories. The method is renamed to
GenerateFilename.

The related unit tests have been moved as well.

More details: go/offline-pages-filename-generation-base.

Change-Id: I5186d88359613caf1db190fac7a75c8df7c48f54
Bug:  757073 
Reviewed-on: https://chromium-review.googlesource.com/888171
Commit-Queue: Yafei Duan <romax@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533858}
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/BUILD.gn
[add] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/filename_generation/BUILD.gn
[add] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/filename_generation/DEPS
[add] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/filename_generation/filename_generation.cc
[add] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/filename_generation/filename_generation.h
[add] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/components/filename_generation/filename_generation_unittest.cc
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/content/browser/BUILD.gn
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/content/browser/DEPS
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/content/browser/download/save_package.cc
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/content/browser/download/save_package.h
[modify] https://crrev.com/69ddcfd978c5a9574b2175cf772298dbde80640a/content/browser/download/save_package_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Feb 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c9f95ecd991b5b74294926c419e344178b6ad85c

commit c9f95ecd991b5b74294926c419e344178b6ad85c
Author: Yafei Duan <romax@chromium.org>
Date: Thu Feb 08 02:35:31 2018

Moving filename truncation to filename_generation.

Filename truncation needs to be accessed by //components/offline_pages
for a specific filename generation as well, hence moving the function
from //chrome/browser to the new component for filename generation.

Tests in previous location are kept since those are still testing
related functionality.

More context and plan:
go/offline-pages-filename-generation-base

Bug:  757073 
Change-Id: Iecbd8851e49918fe1afb64cce532c1b4c7eed599
Reviewed-on: https://chromium-review.googlesource.com/903260
Commit-Queue: Yafei Duan <romax@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535272}
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/chrome/browser/BUILD.gn
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/chrome/browser/download/DEPS
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/chrome/browser/download/download_path_reservation_tracker.cc
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/components/filename_generation/filename_generation.cc
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/components/filename_generation/filename_generation.h
[modify] https://crrev.com/c9f95ecd991b5b74294926c419e344178b6ad85c/components/filename_generation/filename_generation_unittest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Feb 10 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f7aaf35913f7413061977e654b2ddcfc360ff374

commit f7aaf35913f7413061977e654b2ddcfc360ff374
Author: Pete Williamson <petewil@chromium.org>
Date: Sat Feb 10 00:32:26 2018

[Offline Pages] Adding util method for unique filename generation.

Adding a utility method for generating unique filenames for offline page
based on title and url of the page.

(Re-uploading a change by Romax with fixed merge conflicts)

Bug:  757073 
Change-Id: I03e8e5cc03a640de2abee8e6e903b6bdce53af24

TBR: dimich@chromium.org, dtrainor@chromium.org
Change-Id: I03e8e5cc03a640de2abee8e6e903b6bdce53af24
Reviewed-on: https://chromium-review.googlesource.com/911837
Reviewed-by: Peter Williamson <petewil@chromium.org>
Commit-Queue: Peter Williamson <petewil@chromium.org>
Cr-Commit-Position: refs/heads/master@{#535898}
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/filename_generation/filename_generation.cc
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/filename_generation/filename_generation_unittest.cc
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/offline_pages/core/BUILD.gn
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/offline_pages/core/DEPS
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/offline_pages/core/model/offline_page_model_utils.cc
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/offline_pages/core/model/offline_page_model_utils.h
[modify] https://crrev.com/f7aaf35913f7413061977e654b2ddcfc360ff374/components/offline_pages/core/model/offline_page_model_utils_unittest.cc

Comment 6 by romax@chromium.org, Mar 6 2018

Status: Fixed (was: Started)
I think this has been fixed by the CL above.

Sign in to add a comment