[LargeIconService] Update parameters for Google server (issue 2790113002 by jkrcal@chromium.org)

120 views
Skip to first unread message

jkr...@chromium.org

unread,
Apr 3, 2017, 8:55:31 AM4/3/17
to pkot...@chromium.org, chromium...@chromium.org
Reviewers: pkotwicz
CL: https://codereview.chromium.org/2790113002/

Message:
Peter, could you PTAL?

Description:
[LargeIconService] Update parameters for Google server

This CL makes two small changes:
- Fix two typos/omissions in the URL format so that it actually works
as intended.
- Change to sizes that we ask for. As the only (experimental)
application for M59 is for publisher favicons which are at most 64px
on high-end hardware, we decrease the sizes for the time being to
save users' data as well as server band-width.

BUG=644102

Affected files (+5, -5 lines):
M components/favicon/core/large_icon_service.cc


Index: components/favicon/core/large_icon_service.cc
diff --git a/components/favicon/core/large_icon_service.cc b/components/favicon/core/large_icon_service.cc
index 7d519677c51780055520e90d6e9a6f3a0217b1ff..9f2394e63a9d98f7b9cd1588c0326cee01576636 100644
--- a/components/favicon/core/large_icon_service.cc
+++ b/components/favicon/core/large_icon_service.cc
@@ -30,11 +30,11 @@ namespace favicon {
namespace {

const char kGoogleServerV2RequestFormat[] =
- "https://t0.gstatic.com/"
- "faviconV2?user=chrome&drop_404_icon=true&size=%d&min_size=%d&max_size=%d&"
- "fallback_opts=TYPE&url=%s";
-const int kGoogleServerV2MaxSizeInPixel = 256;
-const int kGoogleServerV2DesiredSizeInPixel = 192;
+ "https://t0.gstatic.com/faviconV2?"
+ "client=chrome&drop_404_icon=true&size=%d&min_size=%d&max_size=%d&"
+ "fallback_opts=TYPE,SIZE&url=%s";
+const int kGoogleServerV2MaxSizeInPixel = 128;
+const int kGoogleServerV2DesiredSizeInPixel = 64;

GURL TrimPageUrlForGoogleServer(const GURL& page_url) {
if (!page_url.SchemeIsHTTPOrHTTPS() || page_url.HostIsIPAddress())


pkot...@chromium.org

unread,
Apr 3, 2017, 10:36:18 PM4/3/17
to jkr...@chromium.org, chromium...@chromium.org

commit-bot@chromium.org via codereview.chromium.org

unread,
Apr 4, 2017, 3:03:01 AM4/4/17
to jkr...@chromium.org, pkot...@chromium.org, commi...@chromium.org, chromium...@chromium.org

commit-bot@chromium.org via codereview.chromium.org

unread,
Apr 4, 2017, 3:08:07 AM4/4/17
to jkr...@chromium.org, pkot...@chromium.org, commi...@chromium.org, chromium...@chromium.org
Reply all
Reply to author
Forward
0 new messages