| 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 2069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2080 content::ResourceContext* context) { | 2080 content::ResourceContext* context) { |
| 2081 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 2081 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 2082 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 2082 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
| 2083 content_settings::CookieSettings* cookie_settings = | 2083 content_settings::CookieSettings* cookie_settings = |
| 2084 io_data->GetCookieSettings(); | 2084 io_data->GetCookieSettings(); |
| 2085 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && | 2085 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && |
| 2086 cookie_settings->IsSettingCookieAllowed(url, first_party_url); | 2086 cookie_settings->IsSettingCookieAllowed(url, first_party_url); |
| 2087 } | 2087 } |
| 2088 #endif // BUILDFLAG(ENABLE_WEBRTC) | 2088 #endif // BUILDFLAG(ENABLE_WEBRTC) |
| 2089 | 2089 |
| 2090 bool ChromeContentBrowserClient::AllowKeygen( | |
| 2091 const GURL& url, | |
| 2092 content::ResourceContext* context) { | |
| 2093 HostContentSettingsMap* content_settings = | |
| 2094 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | |
| 2095 | |
| 2096 return content_settings->GetContentSetting( | |
| 2097 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) == | |
| 2098 CONTENT_SETTING_ALLOW; | |
| 2099 } | |
| 2100 | |
| 2101 ChromeContentBrowserClient::AllowWebBluetoothResult | 2090 ChromeContentBrowserClient::AllowWebBluetoothResult |
| 2102 ChromeContentBrowserClient::AllowWebBluetooth( | 2091 ChromeContentBrowserClient::AllowWebBluetooth( |
| 2103 content::BrowserContext* browser_context, | 2092 content::BrowserContext* browser_context, |
| 2104 const url::Origin& requesting_origin, | 2093 const url::Origin& requesting_origin, |
| 2105 const url::Origin& embedding_origin) { | 2094 const url::Origin& embedding_origin) { |
| 2106 // TODO(crbug.com/598890): Don't disable if | 2095 // TODO(crbug.com/598890): Don't disable if |
| 2107 // base::CommandLine::ForCurrentProcess()-> | 2096 // base::CommandLine::ForCurrentProcess()-> |
| 2108 // HasSwitch(switches::kEnableWebBluetooth) is true. | 2097 // HasSwitch(switches::kEnableWebBluetooth) is true. |
| 2109 if (variations::GetVariationParamValue( | 2098 if (variations::GetVariationParamValue( |
| 2110 PermissionContextBase::kPermissionsKillSwitchFieldStudy, | 2099 PermissionContextBase::kPermissionsKillSwitchFieldStudy, |
| (...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3299 render_frame_host, std::move(source), std::move(request)); | 3288 render_frame_host, std::move(source), std::move(request)); |
| 3300 #else | 3289 #else |
| 3301 // Chrome's media remoting implementation depends on the Media Router | 3290 // Chrome's media remoting implementation depends on the Media Router |
| 3302 // infrastructure to identify remote sinks and provide the user interface for | 3291 // infrastructure to identify remote sinks and provide the user interface for |
| 3303 // sink selection. In the case where the Media Router is not present, simply | 3292 // sink selection. In the case where the Media Router is not present, simply |
| 3304 // drop the interface request. This will prevent code paths for media remoting | 3293 // drop the interface request. This will prevent code paths for media remoting |
| 3305 // in the renderer process from activating. | 3294 // in the renderer process from activating. |
| 3306 #endif | 3295 #endif |
| 3307 } | 3296 } |
| 3308 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3297 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| OLD | NEW |