Skip to content

Commit

Permalink
Disables Handwriting Recognition API.
Browse files Browse the repository at this point in the history
Features and also the origin trial.

Fixes brave/brave-browser#15848
  • Loading branch information
mkarolin committed May 18, 2021
1 parent 383d187 commit 5eb0319
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/brave_main_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ bool BraveMainDelegate::BasicStartupComplete(int* exit_code) {
std::unordered_set<const char*> disabled_features = {
autofill::features::kAutofillEnableAccountWalletStorage.name,
autofill::features::kAutofillServerCommunication.name,
blink::features::kHandwritingRecognitionWebPlatformApi.name,
blink::features::kHandwritingRecognitionWebPlatformApiFinch.name,
blink::features::kInterestCohortAPIOriginTrial.name,
blink::features::kInterestCohortFeaturePolicy.name,
blink::features::kTextFragmentAnchor.name,
Expand Down
2 changes: 2 additions & 0 deletions app/brave_main_delegate_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ IN_PROC_BROWSER_TEST_F(BraveMainDelegateBrowserTest, DisabledFeatures) {
const base::Feature* disabled_features[] = {
&autofill::features::kAutofillEnableAccountWalletStorage,
&autofill::features::kAutofillServerCommunication,
&blink::features::kHandwritingRecognitionWebPlatformApi,
&blink::features::kHandwritingRecognitionWebPlatformApiFinch,
&blink::features::kInterestCohortAPIOriginTrial,
&blink::features::kInterestCohortFeaturePolicy,
&blink::features::kTextFragmentAnchor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ bool IsTrialDisabledInBrave(const StringView& trial_name) {
// When updating also update the array in the overload below.
static const char* const kBraveDisabledTrialNames[] = {
"DigitalGoods",
"HandwritingRecognition",
"SignedExchangeSubresourcePrefetch",
"SubresourceWebBundles",
"TrustTokens",
Expand All @@ -39,8 +40,9 @@ bool IsTrialDisabledInBrave(const StringView& trial_name) {

bool IsTrialDisabledInBrave(OriginTrialFeature feature) {
// When updating also update the array in the overload above.
static const std::array<OriginTrialFeature, 4> kBraveDisabledTrialFeatures = {
static const std::array<OriginTrialFeature, 5> kBraveDisabledTrialFeatures = {
OriginTrialFeature::kDigitalGoods,
OriginTrialFeature::kHandwritingRecognition,
OriginTrialFeature::kSignedExchangeSubresourcePrefetch,
OriginTrialFeature::kSubresourceWebBundles,
OriginTrialFeature::kTrustTokens,
Expand Down

0 comments on commit 5eb0319

Please sign in to comment.