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

Issue 1180403005: Use URL without fragment when query recent redirect list for favicons. (Closed)

Created:
5 years, 6 months ago by beaudoin
Modified:
5 years, 5 months ago
Reviewers:
sky
CC:
chromium-reviews, harryyu
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use URL without fragment when query recent redirect list for favicons. The hash fragment is often set with Javascript when a page loads, which causes the favicon mechanism to use the URL with fragment to query the recent redirects. However, the recent redirects are typically keyed to the URL without the hash. We need to keep to lookup for the URL with an hash, though, in case the redirect is keyed to it, which happens if the user navigated to a URL with a hash fragment but was redirected. BUG=498618 Committed: https://crrev.com/6bef27e9bb046778a13b5cd7025208218c098e80 Cr-Commit-Position: refs/heads/master@{#335268}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Extracted duplicate code. #

Patch Set 3 : Minor clean-up. #

Patch Set 4 : Minor clean-up (2) #

Total comments: 6

Patch Set 5 : Use auto and |= #

Patch Set 6 : Now with 100% whole grain tests! #

Patch Set 7 : Minor update. #

Total comments: 2

Patch Set 8 : Rebased and answered nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -5 lines) Patch
M components/history/core/browser/history_backend.h View 1 2 3 4 5 6 7 2 chunks +11 lines, -1 line 0 comments Download
M components/history/core/browser/history_backend.cc View 1 2 3 4 5 6 7 1 chunk +20 lines, -4 lines 0 comments Download
M components/history/core/browser/history_backend_unittest.cc View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (3 generated)
beaudoin
5 years, 6 months ago (2015-06-16 19:14:29 UTC) #2
sky
How about some test coverage? https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc#newcode2087 components/history/core/browser/history_backend.cc:2087: GetCachedRecentRedirects(page_url, &redirects); If the ...
5 years, 6 months ago (2015-06-16 22:06:24 UTC) #3
chromium-reviews
On Tue, Jun 16, 2015, 6:06 PM <sky@chromium.org> wrote: How about some test coverage? https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc ...
5 years, 6 months ago (2015-06-16 22:46:54 UTC) #4
sky
Is there a rush for no test coverage? Seems to me you don't need extra_redirects. ...
5 years, 6 months ago (2015-06-16 23:41:08 UTC) #5
sky
https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc#newcode2104 components/history/core/browser/history_backend.cc:2104: for (RedirectList::const_iterator i(extra_redirects.begin()); This is the part I dislike ...
5 years, 6 months ago (2015-06-17 16:07:30 UTC) #6
beaudoin
PTAL. https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1180403005/diff/1/components/history/core/browser/history_backend.cc#newcode2087 components/history/core/browser/history_backend.cc:2087: GetCachedRecentRedirects(page_url, &redirects); On 2015/06/16 22:06:23, sky wrote: > ...
5 years, 6 months ago (2015-06-17 16:51:27 UTC) #7
sky
https://codereview.chromium.org/1180403005/diff/60001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1180403005/diff/60001/components/history/core/browser/history_backend.cc#newcode2096 components/history/core/browser/history_backend.cc:2096: mappings_changed = mappings_changed || Don't you need the |= ...
5 years, 6 months ago (2015-06-17 17:39:27 UTC) #8
beaudoin
PTAL https://codereview.chromium.org/1180403005/diff/60001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): https://codereview.chromium.org/1180403005/diff/60001/components/history/core/browser/history_backend.cc#newcode2096 components/history/core/browser/history_backend.cc:2096: mappings_changed = mappings_changed || On 2015/06/17 17:39:27, sky ...
5 years, 6 months ago (2015-06-17 18:06:39 UTC) #9
sky
And given this code would have broke, we need test coverage. https://codereview.chromium.org/1180403005/diff/60001/components/history/core/browser/history_backend.cc File components/history/core/browser/history_backend.cc (right): ...
5 years, 6 months ago (2015-06-17 21:20:45 UTC) #10
beaudoin
Will try to write a test before going away and ping the thread again then. ...
5 years, 6 months ago (2015-06-17 22:50:29 UTC) #11
beaudoin
Added a test (And found an error doing it! The shame!). PTAL.
5 years, 6 months ago (2015-06-18 23:45:08 UTC) #12
sky
LGTM https://codereview.chromium.org/1180403005/diff/120001/components/history/core/browser/history_backend.h File components/history/core/browser/history_backend.h (right): https://codereview.chromium.org/1180403005/diff/120001/components/history/core/browser/history_backend.h#newcode699 components/history/core/browser/history_backend.h:699: // Returns true if the function changed some ...
5 years, 6 months ago (2015-06-19 14:49:53 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1180403005/140001
5 years, 6 months ago (2015-06-19 15:30:44 UTC) #16
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 6 months ago (2015-06-19 16:28:02 UTC) #17
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/6bef27e9bb046778a13b5cd7025208218c098e80 Cr-Commit-Position: refs/heads/master@{#335268}
5 years, 6 months ago (2015-06-19 16:29:20 UTC) #18
beaudoin
5 years, 5 months ago (2015-07-06 18:27:24 UTC) #19
Message was sent while issue was closed.
https://codereview.chromium.org/1180403005/diff/120001/components/history/cor...
File components/history/core/browser/history_backend.h (right):

https://codereview.chromium.org/1180403005/diff/120001/components/history/cor...
components/history/core/browser/history_backend.h:699: // Returns true if the
function changed some of the |page_urls| mappings.
On 2015/06/19 14:49:53, sky wrote:
> some->at least one

Done.

Powered by Google App Engine
This is Rietveld 408576698