Commit 5e9f8064 authored by Raymes Khoury's avatar Raymes Khoury Committed by Commit Bot

Enable Permission Delegation

This enables the Permission Delegation feature by default.

Bug: 802945, 818004
Change-Id: I1631401b929aee66def51d44e71e1d95915fcd54
Reviewed-on: https://chromium-review.googlesource.com/1201644Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
Reviewed-by: default avatarMartin Šrámek <msramek@chromium.org>
Commit-Queue: Raymes Khoury <raymes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589072}
parent 08441c41
......@@ -249,6 +249,18 @@ ContentSettingsContentSettingSetFunction::Run() {
readable_type_name.c_str())));
}
size_t num_values = 0;
int histogram_value =
ContentSettingTypeToHistogramValue(content_type, &num_values);
if (primary_pattern != secondary_pattern &&
secondary_pattern != ContentSettingsPattern::Wildcard()) {
UMA_HISTOGRAM_EXACT_LINEAR("ContentSettings.ExtensionEmbeddedSettingSet",
histogram_value, num_values);
} else {
UMA_HISTOGRAM_EXACT_LINEAR("ContentSettings.ExtensionNonEmbeddedSettingSet",
histogram_value, num_values);
}
if (primary_pattern != secondary_pattern &&
secondary_pattern != ContentSettingsPattern::Wildcard() &&
!info->website_settings_info()->SupportsEmbeddedExceptions() &&
......@@ -288,18 +300,6 @@ ContentSettingsContentSettingSetFunction::Run() {
return RespondNow(Error(pref_keys::kIncognitoSessionOnlyErrorMessage));
}
size_t num_values = 0;
int histogram_value =
ContentSettingTypeToHistogramValue(content_type, &num_values);
if (primary_pattern != secondary_pattern &&
secondary_pattern != ContentSettingsPattern::Wildcard()) {
UMA_HISTOGRAM_EXACT_LINEAR("ContentSettings.ExtensionEmbeddedSettingSet",
histogram_value, num_values);
} else {
UMA_HISTOGRAM_EXACT_LINEAR("ContentSettings.ExtensionNonEmbeddedSettingSet",
histogram_value, num_values);
}
scoped_refptr<ContentSettingsStore> store =
ContentSettingsService::Get(browser_context())->content_settings_store();
store->SetExtensionContentSetting(extension_id(), primary_pattern,
......
......@@ -370,7 +370,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionContentSettingsApiTest,
EXPECT_TRUE(RunExtensionSubtest(kExtensionPath, "test.html")) << message_;
size_t num_values = 0;
int javascript_type = ContentSettingTypeToHistogramValue(
int images_type = ContentSettingTypeToHistogramValue(
CONTENT_SETTINGS_TYPE_IMAGES, &num_values);
int geolocation_type = ContentSettingTypeToHistogramValue(
CONTENT_SETTINGS_TYPE_GEOLOCATION, &num_values);
......@@ -378,14 +378,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionContentSettingsApiTest,
CONTENT_SETTINGS_TYPE_COOKIES, &num_values);
histogram_tester.ExpectBucketCount(
"ContentSettings.ExtensionEmbeddedSettingSet", javascript_type, 1);
"ContentSettings.ExtensionEmbeddedSettingSet", images_type, 1);
histogram_tester.ExpectBucketCount(
"ContentSettings.ExtensionEmbeddedSettingSet", geolocation_type, 1);
histogram_tester.ExpectTotalCount(
"ContentSettings.ExtensionEmbeddedSettingSet", 2);
histogram_tester.ExpectBucketCount(
"ContentSettings.ExtensionNonEmbeddedSettingSet", javascript_type, 1);
"ContentSettings.ExtensionNonEmbeddedSettingSet", images_type, 1);
histogram_tester.ExpectBucketCount(
"ContentSettings.ExtensionNonEmbeddedSettingSet", cookies_type, 1);
histogram_tester.ExpectTotalCount(
......
......@@ -447,7 +447,7 @@ const base::Feature kUseNewAcceptLanguageHeader{
// Delegate permissions to cross-origin iframes when the feature has been
// allowed by feature policy.
const base::Feature kPermissionDelegation{"PermissionDelegation",
base::FEATURE_DISABLED_BY_DEFAULT};
base::FEATURE_ENABLED_BY_DEFAULT};
// Disables PostScript generation when printing to PostScript capable printers
// and instead sends Emf files.
......
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