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

Issue 2535463002: [Favicon] Stop caching the default favicon (Closed)

Created:
4 years ago by minggang
Modified:
4 years ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Currently, we are caching the default favicon, but the scale factor is ignored. So we need to remove this in order to take the required scale factor into account. BUG=668023 Committed: https://crrev.com/47fcdcbb580f9077c0b484ffc43a01f71960e06a Cr-Commit-Position: refs/heads/master@{#436237}

Patch Set 1 #

Total comments: 12

Patch Set 2 : [Favicon] Get the default favicon size in pixel #

Total comments: 5

Patch Set 3 : restructure the code #

Total comments: 2

Patch Set 4 : Remove the caching #

Total comments: 1

Patch Set 5 : Inline ui::GetSupportedScaleFactor #

Patch Set 6 : Remove the unused favicon_index #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -18 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/favicon_source.h View 1 2 3 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/ui/webui/favicon_source.cc View 1 2 3 4 5 1 chunk +4 lines, -14 lines 0 comments Download

Messages

Total messages: 41 (12 generated)
minggang
PTAL, thanks!
4 years ago (2016-11-25 06:40:16 UTC) #2
Peter Kasting
https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (right): https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc#newcode186 chrome/browser/ui/webui/favicon_source.cc:186: std::ceil(icon_request.size_in_dip * icon_request.device_scale_factor); Why ceil, and not round? https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc#newcode201 ...
4 years ago (2016-11-26 06:22:30 UTC) #3
minggang
https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (right): https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc#newcode186 chrome/browser/ui/webui/favicon_source.cc:186: std::ceil(icon_request.size_in_dip * icon_request.device_scale_factor); 1 pixel higher resolution is always ...
4 years ago (2016-11-28 02:53:07 UTC) #4
Peter Kasting
https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (right): https://codereview.chromium.org/2535463002/diff/1/chrome/browser/ui/webui/favicon_source.cc#newcode186 chrome/browser/ui/webui/favicon_source.cc:186: std::ceil(icon_request.size_in_dip * icon_request.device_scale_factor); I'm not any more sure that ...
4 years ago (2016-11-28 03:42:43 UTC) #5
minggang
CL updates, PTAL thanks!
4 years ago (2016-11-28 07:35:33 UTC) #6
Peter Kasting
It's somewhat frustrating that you _still_ haven't answered the question I asked earlier about what ...
4 years ago (2016-11-28 07:57:53 UTC) #7
minggang
If I don't misunderstand your question, you want me to point out values, which will ...
4 years ago (2016-11-28 08:40:47 UTC) #8
Peter Kasting
Side note: When replying to comments, try to reply below the quoted text rather than ...
4 years ago (2016-11-28 09:11:55 UTC) #9
minggang
On 2016/11/28 09:11:55, Peter Kasting wrote: > Side note: When replying to comments, try to ...
4 years ago (2016-11-28 09:55:18 UTC) #10
minggang
https://codereview.chromium.org/2535463002/diff/20001/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (right): https://codereview.chromium.org/2535463002/diff/20001/chrome/browser/ui/webui/favicon_source.cc#newcode192 chrome/browser/ui/webui/favicon_source.cc:192: favicon_size = SIZE_64; On 2016/11/28 09:11:55, Peter Kasting wrote: ...
4 years ago (2016-11-28 09:56:19 UTC) #11
Peter Kasting
On 2016/11/28 09:55:18, minggang wrote: > What I want to express is any arbitrary size, ...
4 years ago (2016-11-28 20:42:48 UTC) #12
minggang
On 2016/11/28 20:42:48, Peter Kasting wrote: > On 2016/11/28 09:55:18, minggang wrote: > > What ...
4 years ago (2016-11-29 08:08:34 UTC) #13
Peter Kasting
Maybe I did not ask my question in the right way. Please be specific about ...
4 years ago (2016-11-29 10:28:28 UTC) #14
oshima
https://codereview.chromium.org/2535463002/diff/20001/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (left): https://codereview.chromium.org/2535463002/diff/20001/chrome/browser/ui/webui/favicon_source.cc#oldcode198 chrome/browser/ui/webui/favicon_source.cc:198: default_favicons_[favicon_index].get(); I believe the problem is that cache doesn't ...
4 years ago (2016-11-30 18:04:38 UTC) #15
minggang
Based on the previous comments, I change the code and give a detailed description of ...
4 years ago (2016-12-01 06:30:12 UTC) #16
Peter Kasting
https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (left): https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc#oldcode198 chrome/browser/ui/webui/favicon_source.cc:198: default_favicons_[favicon_index].get(); oshima suggested that just removing this cache might ...
4 years ago (2016-12-01 07:17:46 UTC) #18
minggang
https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (left): https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc#oldcode198 chrome/browser/ui/webui/favicon_source.cc:198: default_favicons_[favicon_index].get(); On 2016/12/01 07:17:46, Peter Kasting wrote: > oshima ...
4 years ago (2016-12-01 08:40:24 UTC) #19
Peter Kasting
On 2016/12/01 08:40:24, minggang wrote: > https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc > File chrome/browser/ui/webui/favicon_source.cc (left): > > https://codereview.chromium.org/2535463002/diff/40001/chrome/browser/ui/webui/favicon_source.cc#oldcode198 > ...
4 years ago (2016-12-01 09:09:59 UTC) #20
oshima
On 2016/12/01 09:09:59, Peter Kasting wrote: > On 2016/12/01 08:40:24, minggang wrote: > > > ...
4 years ago (2016-12-01 19:11:53 UTC) #21
minggang
On 2016/12/01 19:11:53, oshima wrote: > On 2016/12/01 09:09:59, Peter Kasting wrote: > > On ...
4 years ago (2016-12-02 02:20:22 UTC) #22
minggang
Peter, oshima PTAL
4 years ago (2016-12-02 07:12:52 UTC) #24
Peter Kasting
LGTM https://codereview.chromium.org/2535463002/diff/60001/chrome/browser/ui/webui/favicon_source.cc File chrome/browser/ui/webui/favicon_source.cc (right): https://codereview.chromium.org/2535463002/diff/60001/chrome/browser/ui/webui/favicon_source.cc#newcode199 chrome/browser/ui/webui/favicon_source.cc:199: ui::GetSupportedScaleFactor(icon_request.device_scale_factor); Nit: I'd just inline this below.
4 years ago (2016-12-02 21:27:01 UTC) #25
xiyuan
lgtm
4 years ago (2016-12-02 21:27:59 UTC) #26
oshima
lgtm On 2016/12/02 21:27:01, Peter Kasting wrote: > LGTM > > https://codereview.chromium.org/2535463002/diff/60001/chrome/browser/ui/webui/favicon_source.cc > File chrome/browser/ui/webui/favicon_source.cc ...
4 years ago (2016-12-02 21:48:27 UTC) #27
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/2535463002/80001
4 years ago (2016-12-05 05:28:08 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/245686)
4 years ago (2016-12-05 05:46:19 UTC) #32
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/2535463002/100001
4 years ago (2016-12-05 06:00:48 UTC) #36
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-12-05 07:12:58 UTC) #39
commit-bot: I haz the power
4 years ago (2016-12-05 07:14:35 UTC) #41
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/47fcdcbb580f9077c0b484ffc43a01f71960e06a
Cr-Commit-Position: refs/heads/master@{#436237}

Powered by Google App Engine
This is Rietveld 408576698