| 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 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 content::ResourceContext* context) { | 2092 content::ResourceContext* context) { |
| 2093 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 2093 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 2094 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 2094 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
| 2095 content_settings::CookieSettings* cookie_settings = | 2095 content_settings::CookieSettings* cookie_settings = |
| 2096 io_data->GetCookieSettings(); | 2096 io_data->GetCookieSettings(); |
| 2097 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && | 2097 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && |
| 2098 cookie_settings->IsSettingCookieAllowed(url, first_party_url); | 2098 cookie_settings->IsSettingCookieAllowed(url, first_party_url); |
| 2099 } | 2099 } |
| 2100 #endif // BUILDFLAG(ENABLE_WEBRTC) | 2100 #endif // BUILDFLAG(ENABLE_WEBRTC) |
| 2101 | 2101 |
| 2102 bool ChromeContentBrowserClient::AllowKeygen( | |
| 2103 const GURL& url, | |
| 2104 content::ResourceContext* context) { | |
| 2105 HostContentSettingsMap* content_settings = | |
| 2106 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | |
| 2107 | |
| 2108 return content_settings->GetContentSetting( | |
| 2109 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) == | |
| 2110 CONTENT_SETTING_ALLOW; | |
| 2111 } | |
| 2112 | |
| 2113 ChromeContentBrowserClient::AllowWebBluetoothResult | 2102 ChromeContentBrowserClient::AllowWebBluetoothResult |
| 2114 ChromeContentBrowserClient::AllowWebBluetooth( | 2103 ChromeContentBrowserClient::AllowWebBluetooth( |
| 2115 content::BrowserContext* browser_context, | 2104 content::BrowserContext* browser_context, |
| 2116 const url::Origin& requesting_origin, | 2105 const url::Origin& requesting_origin, |
| 2117 const url::Origin& embedding_origin) { | 2106 const url::Origin& embedding_origin) { |
| 2118 // TODO(crbug.com/598890): Don't disable if | 2107 // TODO(crbug.com/598890): Don't disable if |
| 2119 // base::CommandLine::ForCurrentProcess()-> | 2108 // base::CommandLine::ForCurrentProcess()-> |
| 2120 // HasSwitch(switches::kEnableWebBluetooth) is true. | 2109 // HasSwitch(switches::kEnableWebBluetooth) is true. |
| 2121 if (variations::GetVariationParamValue( | 2110 if (variations::GetVariationParamValue( |
| 2122 PermissionContextBase::kPermissionsKillSwitchFieldStudy, | 2111 PermissionContextBase::kPermissionsKillSwitchFieldStudy, |
| (...skipping 1224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3347 GetBrowserSchedulerWorkerPoolParamsFromVariations(); | 3336 GetBrowserSchedulerWorkerPoolParamsFromVariations(); |
| 3348 *index_to_traits_callback = base::Bind(&task_scheduler_util::initialization:: | 3337 *index_to_traits_callback = base::Bind(&task_scheduler_util::initialization:: |
| 3349 BrowserWorkerPoolIndexForTraits); | 3338 BrowserWorkerPoolIndexForTraits); |
| 3350 } | 3339 } |
| 3351 | 3340 |
| 3352 void ChromeContentBrowserClient:: | 3341 void ChromeContentBrowserClient:: |
| 3353 PerformExperimentalTaskSchedulerRedirections() { | 3342 PerformExperimentalTaskSchedulerRedirections() { |
| 3354 task_scheduler_util::variations:: | 3343 task_scheduler_util::variations:: |
| 3355 MaybePerformBrowserTaskSchedulerRedirection(); | 3344 MaybePerformBrowserTaskSchedulerRedirection(); |
| 3356 } | 3345 } |
| OLD | NEW |