Skip to content

Commit

Permalink
[Periodic Background Sync] Add flag to enable it.
Browse files Browse the repository at this point in the history
This adds logic to enable Periodic Background Sync through chrome
flags, so that early adapters can enable it for testing.

Bug: 925297
Change-Id: I6fbb2ce68fce254b43cb6a702a7f44737e7668cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648218
Reviewed-by: Peter Beverloo <peter@chromium.org>
Commit-Queue: Mugdha Lakhani <nator@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667580}
  • Loading branch information
Mugdha Lakhani authored and Commit Bot committed Jun 10, 2019
1 parent 3438927 commit 778b895
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3908,6 +3908,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnableAutofillCreditCardUploadFeedbackDescription,
kOsWin | kOsMac | kOsLinux,
FEATURE_VALUE_TYPE(autofill::features::kAutofillCreditCardUploadFeedback)},
{"periodic-background-sync", flag_descriptions::kPeriodicBackgroundSyncName,
flag_descriptions::kPeriodicBackgroundSyncDescription, kOsAll,
FEATURE_VALUE_TYPE(features::kPeriodicBackgroundSync)},

// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2662,6 +2662,11 @@
"owners": [ "rouslan" ],
"expiry_milestone": 78
},
{
"name": "periodic-background-sync",
"owners": [ "nator" ],
"expiry_milestone": 80
},
{
"name": "postscript-printing",
"owners": [ "//printing/OWNERS" ],
Expand Down
4 changes: 4 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,10 @@ const char kPasswordsMigrateLinuxToLoginDBDescription[] =
"Performs a one-off irreversible migration of passwords from the "
"gnome-keyring or kwallet into the profile directory.";

const char kPeriodicBackgroundSyncName[] = "Periodic Background Sync";
const char kPeriodicBackgroundSyncDescription[] =
"If enabled, web apps can periodically sync content in the background.";

const char kPerMethodCanMakePaymentQuotaName[] =
"Per-method canMakePayment() quota.";
const char kPerMethodCanMakePaymentQuotaDescription[] =
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,9 @@ extern const char kPasswordsKeyboardAccessoryDescription[];
extern const char kPasswordsMigrateLinuxToLoginDBName[];
extern const char kPasswordsMigrateLinuxToLoginDBDescription[];

extern const char kPeriodicBackgroundSyncName[];
extern const char kPeriodicBackgroundSyncDescription[];

extern const char kPerMethodCanMakePaymentQuotaName[];
extern const char kPerMethodCanMakePaymentQuotaDescription[];

Expand Down
2 changes: 2 additions & 0 deletions tools/metrics/histograms/enums.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33853,6 +33853,7 @@ Called by update_gpu_driver_bug_workaround_entries.py.-->
label="SupervisedUserCommittedInterstitials:enabled"/>
<int value="-1096595907" label="disable-new-virtual-keyboard-behavior"/>
<int value="-1095947169" label="ModalPermissionDialogView:disabled"/>
<int value="-1093104008" label="PeriodicBackgroundSync:disabled"/>
<summary>Chrome flags that lead to Chrome restart on Chrome OS.</summary>
<!--
Values in LoginCustomFlags are: value=(uint32_t)MD5(label).
Expand Down Expand Up @@ -34003,6 +34004,7 @@ from previous Chrome versions.
<int value="-876148583" label="ArcBootCompletedBroadcast:disabled"/>
<int value="-874602599" label="HorizontalTabSwitcherAndroid:enabled"/>
<int value="-872764392" label="ContextualSuggestionsBottomSheet:disabled"/>
<int value="-872302695" label="PeriodicBackgroundSync:enabled"/>
<int value="-867087281" label="enable-virtual-keyboard"/>
<int value="-866993841" label="OfflinePagesCTV2:disabled"/>
<int value="-864266073" label="cros-regions-mode"/>
Expand Down

0 comments on commit 778b895

Please sign in to comment.