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

Issue 2711563003: Do not drop the final web app scope path component if it ends with a slash. (Closed)

Created:
3 years, 10 months ago by dominickn
Modified:
3 years, 10 months ago
Reviewers:
pkotwicz, Yaron
CC:
chromium-reviews, agrieve+watch_chromium.org, chrome-apps-syd-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not drop the final web app scope path component if it ends with a slash. This CL updates the web app scope computation. The current computation drops the final component of the path if there is more than one component. For web apps which have a start URL that ends in a folder, this removes the containing folder, resulting in an overly broad scope. For instance, https://example.com/today/ would end up with a scope over all of https://example.com under this scheme. Instead, we refine the computation by not dropping the final path component if the path ends with a slash. This indicates that the final component is a directory which should be retained. Otherwise, a lack of a slash at the end of the path signals a file, which we remove to extract the containing directory. BUG=688888 Review-Url: https://codereview.chromium.org/2711563003 Cr-Commit-Position: refs/heads/master@{#452279} Committed: https://chromium.googlesource.com/chromium/src/+/4141e5db756f115ae51c31f71d33d6c3a8422638

Patch Set 1 #

Total comments: 2

Patch Set 2 : Extra test for dir + fragment and query #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -7 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java View 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java View 1 3 chunks +11 lines, -4 lines 0 comments Download

Messages

Total messages: 23 (16 generated)
dominickn
PTAL, thanks!
3 years, 10 months ago (2017-02-22 03:49:01 UTC) #5
Yaron
https://codereview.chromium.org/2711563003/diff/1/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java File chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java (right): https://codereview.chromium.org/2711563003/diff/1/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java#newcode38 chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java:38: String url12 = "http://www.google.com:8000/maps/au/index.html?q=maps#fragment/"; AFAIK there's nothing with prevents ...
3 years, 10 months ago (2017-02-22 16:30:53 UTC) #10
Yaron
On 2017/02/22 16:30:53, Yaron (limited availability) wrote: > https://codereview.chromium.org/2711563003/diff/1/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java > File > chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java > (right): ...
3 years, 10 months ago (2017-02-22 16:31:36 UTC) #11
pkotwicz
lgtm
3 years, 10 months ago (2017-02-22 20:26:55 UTC) #12
dominickn
Thanks! https://codereview.chromium.org/2711563003/diff/1/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java File chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java (right): https://codereview.chromium.org/2711563003/diff/1/chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java#newcode38 chrome/android/junit/src/org/chromium/chrome/browser/ShortcutHelperTest.java:38: String url12 = "http://www.google.com:8000/maps/au/index.html?q=maps#fragment/"; On 2017/02/22 16:30:53, Yaron ...
3 years, 10 months ago (2017-02-22 22:53:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2711563003/20001
3 years, 10 months ago (2017-02-22 23:41:37 UTC) #20
commit-bot: I haz the power
3 years, 10 months ago (2017-02-22 23:49:56 UTC) #23
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/4141e5db756f115ae51c31f71d33...

Powered by Google App Engine
This is Rietveld 408576698