Commit ee0b4d8b authored by benwells's avatar benwells Committed by Commit bot

Record add to homescreen events with URL from the owning web contents.

This change fixes a bug in 42 which is triggered if the start URL from
the manifest is not the same as the current page. In this case, the
fact that the shortcut was added is not remembered, causing the banner
to come up in future.

BUG=474631

Review URL: https://codereview.chromium.org/1065153002

Cr-Commit-Position: refs/heads/master@{#324198}
parent 900d55c8
...@@ -349,7 +349,7 @@ void ShortcutHelper::RecordAddToHomescreen() { ...@@ -349,7 +349,7 @@ void ShortcutHelper::RecordAddToHomescreen() {
// Record that the shortcut has been added, so no banners will be shown // Record that the shortcut has been added, so no banners will be shown
// for this app. // for this app.
AppBannerSettingsHelper::RecordBannerEvent( AppBannerSettingsHelper::RecordBannerEvent(
web_contents(), shortcut_info_.url, shortcut_info_.url.spec(), web_contents(), web_contents()->GetURL(), shortcut_info_.url.spec(),
AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN, AppBannerSettingsHelper::APP_BANNER_EVENT_DID_ADD_TO_HOMESCREEN,
base::Time::Now()); base::Time::Now());
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment