| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index a98e46b7abc84b1c1f2e72aa4f424e5dd15783d3..182870c52d397c48946996a591d87057c64bb9b6 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -53,6 +53,7 @@
|
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h"
|
| #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_factory.h"
|
| #include "chrome/browser/notifications/platform_notification_service_impl.h"
|
| +#include "chrome/browser/permissions/permission_context_base.h"
|
| #include "chrome/browser/platform_util.h"
|
| #include "chrome/browser/prerender/prerender_final_status.h"
|
| #include "chrome/browser/prerender/prerender_manager.h"
|
| @@ -2014,19 +2015,31 @@ bool ChromeContentBrowserClient::AllowKeygen(
|
| CONTENT_SETTING_ALLOW;
|
| }
|
|
|
| -bool ChromeContentBrowserClient::AllowWebBluetooth(
|
| +ChromeContentBrowserClient::AllowWebBluetoothResult
|
| +ChromeContentBrowserClient::AllowWebBluetooth(
|
| content::BrowserContext* browser_context,
|
| const url::Origin& requesting_origin,
|
| const url::Origin& embedding_origin) {
|
| + if (variations::GetVariationParamValue(
|
| + PermissionContextBase::kPermissionsKillSwitchFieldStudy,
|
| + "Bluetooth") ==
|
| + PermissionContextBase::kPermissionsKillSwitchBlockedValue) {
|
| + // The kill switch is enabled for this permission; Block requests.
|
| + return AllowWebBluetoothResult::BLOCK_KILL_SWITCH;
|
| + }
|
| +
|
| const HostContentSettingsMap* const content_settings =
|
| HostContentSettingsMapFactory::GetForProfile(
|
| Profile::FromBrowserContext(browser_context));
|
|
|
| - return content_settings->GetContentSetting(
|
| - GURL(requesting_origin.Serialize()),
|
| - GURL(embedding_origin.Serialize()),
|
| - CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
|
| - std::string()) != CONTENT_SETTING_BLOCK;
|
| + if (content_settings->GetContentSetting(GURL(requesting_origin.Serialize()),
|
| + GURL(embedding_origin.Serialize()),
|
| + CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
|
| + std::string()) ==
|
| + CONTENT_SETTING_BLOCK) {
|
| + return AllowWebBluetoothResult::BLOCK_POLICY;
|
| + }
|
| + return AllowWebBluetoothResult::ALLOW;
|
| }
|
|
|
| net::URLRequestContext*
|
|
|