| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 2056 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2067 "Bluetooth") == | 2067 "Bluetooth") == |
| 2068 PermissionContextBase::kPermissionsKillSwitchBlockedValue) { | 2068 PermissionContextBase::kPermissionsKillSwitchBlockedValue) { |
| 2069 // The kill switch is enabled for this permission. Block requests. | 2069 // The kill switch is enabled for this permission. Block requests. |
| 2070 return AllowWebBluetoothResult::BLOCK_GLOBALLY_DISABLED; | 2070 return AllowWebBluetoothResult::BLOCK_GLOBALLY_DISABLED; |
| 2071 } | 2071 } |
| 2072 | 2072 |
| 2073 const HostContentSettingsMap* const content_settings = | 2073 const HostContentSettingsMap* const content_settings = |
| 2074 HostContentSettingsMapFactory::GetForProfile( | 2074 HostContentSettingsMapFactory::GetForProfile( |
| 2075 Profile::FromBrowserContext(browser_context)); | 2075 Profile::FromBrowserContext(browser_context)); |
| 2076 | 2076 |
| 2077 if (content_settings->GetContentSetting(GURL(requesting_origin.Serialize()), | 2077 if (content_settings->GetContentSetting( |
| 2078 GURL(embedding_origin.Serialize()), | 2078 requesting_origin.GetURL(), embedding_origin.GetURL(), |
| 2079 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, | 2079 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, |
| 2080 std::string()) == | 2080 std::string()) == CONTENT_SETTING_BLOCK) { |
| 2081 CONTENT_SETTING_BLOCK) { | |
| 2082 return AllowWebBluetoothResult::BLOCK_POLICY; | 2081 return AllowWebBluetoothResult::BLOCK_POLICY; |
| 2083 } | 2082 } |
| 2084 return AllowWebBluetoothResult::ALLOW; | 2083 return AllowWebBluetoothResult::ALLOW; |
| 2085 } | 2084 } |
| 2086 | 2085 |
| 2087 std::string ChromeContentBrowserClient::GetWebBluetoothBlacklist() { | 2086 std::string ChromeContentBrowserClient::GetWebBluetoothBlacklist() { |
| 2088 return variations::GetVariationParamValue("WebBluetoothBlacklist", | 2087 return variations::GetVariationParamValue("WebBluetoothBlacklist", |
| 2089 "blacklist_additions"); | 2088 "blacklist_additions"); |
| 2090 } | 2089 } |
| 2091 | 2090 |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3236 if (channel <= kMaxDisableEncryptionChannel) { | 3235 if (channel <= kMaxDisableEncryptionChannel) { |
| 3237 static const char* const kWebRtcDevSwitchNames[] = { | 3236 static const char* const kWebRtcDevSwitchNames[] = { |
| 3238 switches::kDisableWebRtcEncryption, | 3237 switches::kDisableWebRtcEncryption, |
| 3239 }; | 3238 }; |
| 3240 to_command_line->CopySwitchesFrom(from_command_line, | 3239 to_command_line->CopySwitchesFrom(from_command_line, |
| 3241 kWebRtcDevSwitchNames, | 3240 kWebRtcDevSwitchNames, |
| 3242 arraysize(kWebRtcDevSwitchNames)); | 3241 arraysize(kWebRtcDevSwitchNames)); |
| 3243 } | 3242 } |
| 3244 } | 3243 } |
| 3245 #endif // defined(ENABLE_WEBRTC) | 3244 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |