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

Unified Diff: chrome/browser/banners/app_banner_settings_helper.h

Issue 2474353002: Allow add to homescreen and app banner strings to be changed via variations. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/banners/app_banner_settings_helper.h
diff --git a/chrome/browser/banners/app_banner_settings_helper.h b/chrome/browser/banners/app_banner_settings_helper.h
index 034083f7dcafade170a9dda95d21f6709f6fb8f9..06ab2f30d02e3ee1198168884a4a20e76cb4c537 100644
--- a/chrome/browser/banners/app_banner_settings_helper.h
+++ b/chrome/browser/banners/app_banner_settings_helper.h
@@ -40,6 +40,18 @@ class Profile;
// what we count as a day matches what the user perceives to be days.
class AppBannerSettingsHelper {
public:
+ // An enum for determining the title to use for the add to homescreen / app
+ // banner functionality.
+ // A Java counterpart will be generated for this enum.
+ // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.banners
+ enum LanguageOption {
+ LANGUAGE_OPTION_DEFAULT = 0,
+ LANGUAGE_OPTION_MIN = LANGUAGE_OPTION_DEFAULT,
+ LANGUAGE_OPTION_ADD = 1,
+ LANGUAGE_OPTION_INSTALL = 2,
+ LANGUAGE_OPTION_MAX = LANGUAGE_OPTION_INSTALL,
+ };
+
// TODO(mariakhomenko): Rename events to reflect that they are used in more
// contexts now.
enum AppBannerEvent {
@@ -174,6 +186,10 @@ class AppBannerSettingsHelper {
// Updates all values from field trial.
static void UpdateFromFieldTrial();
+ // Queries variations to determine which language option should be used for
+ // app banners and add to homescreen.
+ static LanguageOption GetHomescreenLanguageOption();
+
// Returns true if the app banner trigger condition should use the site
// engagement score instead of the navigation-based heuristic.
static bool ShouldUseSiteEngagementScore();
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager_android.cc ('k') | chrome/browser/banners/app_banner_settings_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698