New issue
Advanced search Search tips

Issue 631305 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Expose a method to query the app banner settings for a site that was launched recently

Project Member Reported by dominickn@chromium.org, Jul 26 2016

Issue description

The app banner system records a DID_ADD_TO_HOMESCREEN event every time:

a) a user adds a site to homescreen via an app banner
b) a user adds a site to homescreen via the add to homescreen overflow menu item
c) the user launches a site from homescreen

We can expose a method on AppBannerSettingsHelper to let other parts of chromium query whether a site has been recently launched from homescreen.

We should also think about unifying this with the Java-side 10 day recent launch heuristic for PWAs. Perhaps letting the app banner content setting be the source of truth for this would be better?
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/83864870eb6ecf3d28266e6fe191fe182fb86436

commit 83864870eb6ecf3d28266e6fe191fe182fb86436
Author: dominickn <dominickn@chromium.org>
Date: Fri Jul 29 00:38:02 2016

Expose a WasLaunchedRecently method using the app banner content setting.

The app banner system records a DID_ADD_TO_HOMESCREEN event every time:

a) a user adds a site to homescreen via an app banner
b) a user adds a site to homescreen via the add to homescreen overflow
   menu item
c) the user launches a site from homescreen

This CL adds AppBannerSettingsHelper::WasLaunchedRecently, which returns
true if there is any site under a supplied origin which has been added
to or launched from homescreen in the last 10 days. This mirrors the
Java-side heuristic used to determine if notification deep-linking
should take effect.

A future CL will look to combine the Java and C++ side heuristics so
that the timestamp data is stored in one location that is accessible to
both.

BUG= 631305 

Review-Url: https://codereview.chromium.org/2185453003
Cr-Commit-Position: refs/heads/master@{#408530}

[modify] https://crrev.com/83864870eb6ecf3d28266e6fe191fe182fb86436/chrome/browser/banners/app_banner_settings_helper.cc
[modify] https://crrev.com/83864870eb6ecf3d28266e6fe191fe182fb86436/chrome/browser/banners/app_banner_settings_helper.h
[modify] https://crrev.com/83864870eb6ecf3d28266e6fe191fe182fb86436/chrome/browser/banners/app_banner_settings_helper_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment