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

Issue 12780024: Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper (Closed)

Created:
7 years, 9 months ago by Dmitry Titov
Modified:
7 years, 9 months ago
CC:
chromium-reviews, tfarina, jeremya+watch_chromium.org, browser-components-watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, darin-cc_chromium.org, chromium-apps-reviews_chromium.org
Visibility:
Public.

Description

Split FaviconHelper in two: ImageLoadingHelper and FaviconHelper. This is the first step of fixing http://crbug.com/196769. The problem is that there are two types of users of Content::DownloadFavicon() - the favicon consumers and regular icons and images consumers. Recently, the otherwise-generic image download+decoding implementation regressed because it was assumed to be only used for favicon loading. The proposed fix is to add a parameter to the method (enum, FAVICON/IMAGE) and rename it from DownloadFavicon to DownloadImage, to make sure the name corresponds to the impl/usage. This is rename-only part, no additional parameter yet. The FaviconHelper class was split in 2, with new ImageLoadingHelper dealing with images. BUG=196769 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191304

Patch Set 1 #

Patch Set 2 : Split ImageLoadingHelper into image_loading_helper.* #

Patch Set 3 : actually adding new files #

Patch Set 4 : fix build #

Patch Set 5 : moved renamed messages into image_messages.h #

Patch Set 6 : fix ash build #

Patch Set 7 : fixed android build #

Total comments: 8

Patch Set 8 : review feedback from jam@ #

Patch Set 9 : fix build #

Total comments: 14

Patch Set 10 : more cr feedback #

Patch Set 11 : similarity=20 #

Total comments: 12

Patch Set 12 : caitp feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+218 lines, -645 lines) Patch
M android_webview/browser/icon_helper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/favicon/favicon_handler.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/favicon/favicon_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/notifications/message_center_notification_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/ash/launcher/launcher_favicon_loader.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/extensions/shell_window.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/metro_pin_tab_helper_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/ash/balloon_view_ash.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/views/create_application_shortcut_view.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/web_applications/web_app_ui.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -11 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +19 lines, -19 lines 0 comments Download
M content/common/content_message_generator.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
D content/common/icon_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -46 lines 0 comments Download
A + content/common/image_messages.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -22 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +12 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M content/content_renderer.gypi View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/browser/web_contents.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -8 lines 0 comments Download
D content/renderer/favicon_helper.h View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -106 lines 0 comments Download
D content/renderer/favicon_helper.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -220 lines 0 comments Download
A + content/renderer/image_loading_helper.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +28 lines, -57 lines 0 comments Download
A + content/renderer/image_loading_helper.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +36 lines, -129 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -3 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +68 lines, -5 lines 0 comments Download
M ipc/ipc_message_start.h View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
Dmitry Titov
John, I think you may be the best reviewer here... If not, please advice.
7 years, 9 months ago (2013-03-19 02:15:20 UTC) #1
Dmitry Titov
caitkp@ - could you take a look at FaviconHelper changes brettw@ - could you please ...
7 years, 9 months ago (2013-03-19 18:19:38 UTC) #2
jam
(saw this go by so I have a few mostly nits). brettw can do the ...
7 years, 9 months ago (2013-03-19 20:12:21 UTC) #3
Dmitry Titov
Thanks! Updated, PTAL. https://codereview.chromium.org/12780024/diff/20001/content/common/icon_messages.h File content/common/icon_messages.h (right): https://codereview.chromium.org/12780024/diff/20001/content/common/icon_messages.h#newcode29 content/common/icon_messages.h:29: std::vector<content::FaviconURL> /* urls of the favicon ...
7 years, 9 months ago (2013-03-20 01:30:21 UTC) #4
jam
qq: it's a bit hard to review the new file since you didn't use svn ...
7 years, 9 months ago (2013-03-20 23:25:19 UTC) #5
brettw
lgtm https://codereview.chromium.org/12780024/diff/32001/content/renderer/image_loading_helper.cc File content/renderer/image_loading_helper.cc (right): https://codereview.chromium.org/12780024/diff/32001/content/renderer/image_loading_helper.cc#newcode42 content/renderer/image_loading_helper.cc:42: if (image_url.SchemeIs("data")) { Can you use kDataScheme from ...
7 years, 9 months ago (2013-03-20 23:25:56 UTC) #6
jam
some nits https://codereview.chromium.org/12780024/diff/32001/content/common/view_messages.h File content/common/view_messages.h (right): https://codereview.chromium.org/12780024/diff/32001/content/common/view_messages.h#newcode2296 content/common/view_messages.h:2296: std::vector<content::FaviconURL> /* urls of the favicon */) ...
7 years, 9 months ago (2013-03-21 01:14:51 UTC) #7
Dmitry Titov
I've used "git mv" this time, but it didn't upload as D file and A+ ...
7 years, 9 months ago (2013-03-27 22:41:13 UTC) #8
jam
On 2013/03/27 22:41:13, Dmitry Titov wrote: > I've used "git mv" this time, but it ...
7 years, 9 months ago (2013-03-27 23:24:42 UTC) #9
Dmitry Titov
Aga, "git cl upload --similarity=20" worked! "similarity" sets the percent for files to be identical ...
7 years, 9 months ago (2013-03-27 23:39:29 UTC) #10
Cait (Slow)
LGTM (with nits) https://codereview.chromium.org/12780024/diff/47001/chrome/browser/favicon/favicon_util.cc File chrome/browser/favicon/favicon_util.cc (right): https://codereview.chromium.org/12780024/diff/47001/chrome/browser/favicon/favicon_util.cc#newcode11 chrome/browser/favicon/favicon_util.cc:11: #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" needed? https://codereview.chromium.org/12780024/diff/47001/content/common/image_messages.h File content/common/image_messages.h ...
7 years, 9 months ago (2013-03-28 19:10:17 UTC) #11
Dmitry Titov
Thanks Cait! https://codereview.chromium.org/12780024/diff/47001/chrome/browser/favicon/favicon_util.cc File chrome/browser/favicon/favicon_util.cc (right): https://codereview.chromium.org/12780024/diff/47001/chrome/browser/favicon/favicon_util.cc#newcode11 chrome/browser/favicon/favicon_util.cc:11: #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" On 2013/03/28 19:10:18, caitkp wrote: ...
7 years, 9 months ago (2013-03-28 22:52:40 UTC) #12
Dmitry Titov
Julien, contents/common/OWNERS says you can look at *_message.h files. Here, I move 3 messages from ...
7 years, 9 months ago (2013-03-28 23:00:43 UTC) #13
jln (very slow on Chromium)
On 2013/03/28 23:00:43, Dmitry Titov wrote: > Julien, contents/common/OWNERS says you can look at *_message.h ...
7 years, 9 months ago (2013-03-28 23:33:39 UTC) #14
jam
lgtm
7 years, 9 months ago (2013-03-29 00:26:53 UTC) #15
Dmitry Titov
TBR Jonathan, for an OWNER look at the android_webview file in this patch. It's an ...
7 years, 9 months ago (2013-03-29 00:50:13 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dimich@chromium.org/12780024/56001
7 years, 9 months ago (2013-03-29 00:52:06 UTC) #17
commit-bot: I haz the power
Presubmit check for 12780024-56001 failed and returned exit status 1. INFO:root:Found 23 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-29 00:52:26 UTC) #18
joth
lgtm
7 years, 9 months ago (2013-03-29 00:58:12 UTC) #19
joth
lgtm lgtm
7 years, 9 months ago (2013-03-29 00:58:15 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/dimich@chromium.org/12780024/56001
7 years, 9 months ago (2013-03-29 01:00:23 UTC) #21
commit-bot: I haz the power
7 years, 9 months ago (2013-03-29 05:32:05 UTC) #22
Message was sent while issue was closed.
Change committed as 191304

Powered by Google App Engine
This is Rietveld 408576698