1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- From: csagan5 <32685696+csagan5@users.noreply.github.com>
- Date: Sat, 10 Nov 2018 19:47:39 +0100
- Subject: Do not grant notifications to default search engine
- Block gelocation by default instead of granting it for non-enterprise use cases (almost the totality of users)
- ---
- .../search_permissions/search_permissions_service.cc | 18 +++++-------------
- chrome/common/chrome_features.cc | 2 +-
- 2 files changed, 6 insertions(+), 14 deletions(-)
- diff --git a/chrome/browser/android/search_permissions/search_permissions_service.cc b/chrome/browser/android/search_permissions/search_permissions_service.cc
- --- a/chrome/browser/android/search_permissions/search_permissions_service.cc
- +++ b/chrome/browser/android/search_permissions/search_permissions_service.cc
- @@ -333,11 +333,7 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
- return;
- }
-
- - // If we get to here, the DSE is not disabled by enterprise policy. If it was
- - // previously enterprise controlled, we initialize the setting to BLOCK since
- - // we don't know what the user's setting was previously.
- - bool was_enterprise_controlled =
- - pref_service_->GetBoolean(prefs::kDSEWasDisabledByPolicy);
- + // If we get to here, the DSE is not disabled by enterprise policy.
- pref_service_->ClearPref(prefs::kDSEWasDisabledByPolicy);
-
- // Initialize the pref for geolocation if it hasn't been initialized yet.
- @@ -370,10 +366,8 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
- pref_service_->ClearPref(prefs::kDSEGeolocationSettingDeprecated);
- } else if (dse_geolocation_setting == CONTENT_SETTING_ASK) {
- // If the user hasn't explicitly allowed or blocked geolocation for the
- - // DSE, initialize it to allowed.
- - dse_geolocation_setting = was_enterprise_controlled
- - ? CONTENT_SETTING_BLOCK
- - : CONTENT_SETTING_ALLOW;
- + // DSE, initialize it to disallowed.
- + dse_geolocation_setting = CONTENT_SETTING_BLOCK;
- }
-
- // Update the content setting with the auto-grants for the DSE.
- @@ -398,11 +392,9 @@ void SearchPermissionsService::InitializeSettingsIfNeeded() {
- GetContentSetting(dse_origin, CONTENT_SETTINGS_TYPE_NOTIFICATIONS);
- ContentSetting dse_notifications_setting = notifications_setting_to_restore;
- // If the user hasn't explicitly allowed or blocked notifications for the
- - // DSE, initialize it to allowed.
- + // DSE, initialize it to disallowed.
- if (dse_notifications_setting == CONTENT_SETTING_ASK) {
- - dse_notifications_setting = was_enterprise_controlled
- - ? CONTENT_SETTING_BLOCK
- - : CONTENT_SETTING_ALLOW;
- + dse_notifications_setting = CONTENT_SETTING_BLOCK;
- }
-
- // Update the content setting with the auto-grants for the DSE.
- diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
- --- a/chrome/common/chrome_features.cc
- +++ b/chrome/common/chrome_features.cc
- @@ -242,7 +242,7 @@ const char kDisallowUnsafeHttpDownloadsParamName[] = "MimeTypeList";
- #if defined(OS_ANDROID)
- // Enable changing default downloads storage location on Android.
- const base::Feature kDownloadsLocationChange{"DownloadsLocationChange",
- - base::FEATURE_ENABLED_BY_DEFAULT};
- + base::FEATURE_DISABLED_BY_DEFAULT};
- #endif
-
- // Show the number of open incognito windows besides incognito icon on the
- --
- 2.11.0
|