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 1255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3378 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3367 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
3379 return variations::GetVariationParamValue( | 3368 return variations::GetVariationParamValue( |
3380 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3369 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
3381 } | 3370 } |
3382 | 3371 |
3383 bool ChromeContentBrowserClient:: | 3372 bool ChromeContentBrowserClient:: |
3384 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3373 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3385 return variations::GetVariationParamValue( | 3374 return variations::GetVariationParamValue( |
3386 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3375 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3387 } | 3376 } |
OLD | NEW |