| 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 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2034 "Bluetooth") == | 2034 "Bluetooth") == |
| 2035 PermissionContextBase::kPermissionsKillSwitchBlockedValue) { | 2035 PermissionContextBase::kPermissionsKillSwitchBlockedValue) { |
| 2036 // The kill switch is enabled for this permission. Block requests. | 2036 // The kill switch is enabled for this permission. Block requests. |
| 2037 return AllowWebBluetoothResult::BLOCK_GLOBALLY_DISABLED; | 2037 return AllowWebBluetoothResult::BLOCK_GLOBALLY_DISABLED; |
| 2038 } | 2038 } |
| 2039 | 2039 |
| 2040 const HostContentSettingsMap* const content_settings = | 2040 const HostContentSettingsMap* const content_settings = |
| 2041 HostContentSettingsMapFactory::GetForProfile( | 2041 HostContentSettingsMapFactory::GetForProfile( |
| 2042 Profile::FromBrowserContext(browser_context)); | 2042 Profile::FromBrowserContext(browser_context)); |
| 2043 | 2043 |
| 2044 if (content_settings->GetContentSetting(GURL(requesting_origin.Serialize()), | 2044 if (content_settings->GetContentSetting( |
| 2045 GURL(embedding_origin.Serialize()), | 2045 requesting_origin.GetURL(), embedding_origin.GetURL(), |
| 2046 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, | 2046 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, |
| 2047 std::string()) == | 2047 std::string()) == CONTENT_SETTING_BLOCK) { |
| 2048 CONTENT_SETTING_BLOCK) { | |
| 2049 return AllowWebBluetoothResult::BLOCK_POLICY; | 2048 return AllowWebBluetoothResult::BLOCK_POLICY; |
| 2050 } | 2049 } |
| 2051 return AllowWebBluetoothResult::ALLOW; | 2050 return AllowWebBluetoothResult::ALLOW; |
| 2052 } | 2051 } |
| 2053 | 2052 |
| 2054 std::string ChromeContentBrowserClient::GetWebBluetoothBlacklist() { | 2053 std::string ChromeContentBrowserClient::GetWebBluetoothBlacklist() { |
| 2055 return variations::GetVariationParamValue("WebBluetoothBlacklist", | 2054 return variations::GetVariationParamValue("WebBluetoothBlacklist", |
| 2056 "blacklist_additions"); | 2055 "blacklist_additions"); |
| 2057 } | 2056 } |
| 2058 | 2057 |
| (...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3261 if (channel <= kMaxDisableEncryptionChannel) { | 3260 if (channel <= kMaxDisableEncryptionChannel) { |
| 3262 static const char* const kWebRtcDevSwitchNames[] = { | 3261 static const char* const kWebRtcDevSwitchNames[] = { |
| 3263 switches::kDisableWebRtcEncryption, | 3262 switches::kDisableWebRtcEncryption, |
| 3264 }; | 3263 }; |
| 3265 to_command_line->CopySwitchesFrom(from_command_line, | 3264 to_command_line->CopySwitchesFrom(from_command_line, |
| 3266 kWebRtcDevSwitchNames, | 3265 kWebRtcDevSwitchNames, |
| 3267 arraysize(kWebRtcDevSwitchNames)); | 3266 arraysize(kWebRtcDevSwitchNames)); |
| 3268 } | 3267 } |
| 3269 } | 3268 } |
| 3270 #endif // defined(ENABLE_WEBRTC) | 3269 #endif // defined(ENABLE_WEBRTC) |
| OLD | NEW |