| 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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 content::ResourceContext* context) { | 2095 content::ResourceContext* context) { |
| 2096 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 2096 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
| 2097 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 2097 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
| 2098 content_settings::CookieSettings* cookie_settings = | 2098 content_settings::CookieSettings* cookie_settings = |
| 2099 io_data->GetCookieSettings(); | 2099 io_data->GetCookieSettings(); |
| 2100 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && | 2100 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && |
| 2101 cookie_settings->IsSettingCookieAllowed(url, first_party_url); | 2101 cookie_settings->IsSettingCookieAllowed(url, first_party_url); |
| 2102 } | 2102 } |
| 2103 #endif // BUILDFLAG(ENABLE_WEBRTC) | 2103 #endif // BUILDFLAG(ENABLE_WEBRTC) |
| 2104 | 2104 |
| 2105 bool ChromeContentBrowserClient::AllowKeygen( | |
| 2106 const GURL& url, | |
| 2107 content::ResourceContext* context) { | |
| 2108 HostContentSettingsMap* content_settings = | |
| 2109 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); | |
| 2110 | |
| 2111 return content_settings->GetContentSetting( | |
| 2112 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) == | |
| 2113 CONTENT_SETTING_ALLOW; | |
| 2114 } | |
| 2115 | |
| 2116 ChromeContentBrowserClient::AllowWebBluetoothResult | 2105 ChromeContentBrowserClient::AllowWebBluetoothResult |
| 2117 ChromeContentBrowserClient::AllowWebBluetooth( | 2106 ChromeContentBrowserClient::AllowWebBluetooth( |
| 2118 content::BrowserContext* browser_context, | 2107 content::BrowserContext* browser_context, |
| 2119 const url::Origin& requesting_origin, | 2108 const url::Origin& requesting_origin, |
| 2120 const url::Origin& embedding_origin) { | 2109 const url::Origin& embedding_origin) { |
| 2121 // TODO(crbug.com/598890): Don't disable if | 2110 // TODO(crbug.com/598890): Don't disable if |
| 2122 // base::CommandLine::ForCurrentProcess()-> | 2111 // base::CommandLine::ForCurrentProcess()-> |
| 2123 // HasSwitch(switches::kEnableWebBluetooth) is true. | 2112 // HasSwitch(switches::kEnableWebBluetooth) is true. |
| 2124 if (variations::GetVariationParamValue( | 2113 if (variations::GetVariationParamValue( |
| 2125 PermissionContextBase::kPermissionsKillSwitchFieldStudy, | 2114 PermissionContextBase::kPermissionsKillSwitchFieldStudy, |
| (...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3370 PerformExperimentalTaskSchedulerRedirections() { | 3359 PerformExperimentalTaskSchedulerRedirections() { |
| 3371 task_scheduler_util::variations:: | 3360 task_scheduler_util::variations:: |
| 3372 MaybePerformBrowserTaskSchedulerRedirection(); | 3361 MaybePerformBrowserTaskSchedulerRedirection(); |
| 3373 } | 3362 } |
| 3374 | 3363 |
| 3375 //static | 3364 //static |
| 3376 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3365 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3377 const storage::QuotaSettings* settings) { | 3366 const storage::QuotaSettings* settings) { |
| 3378 g_default_quota_settings = settings; | 3367 g_default_quota_settings = settings; |
| 3379 } | 3368 } |
| OLD | NEW |