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 1893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1904 content::ResourceContext* context) { | 1904 content::ResourceContext* context) { |
1905 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1905 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
1906 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 1906 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
1907 content_settings::CookieSettings* cookie_settings = | 1907 content_settings::CookieSettings* cookie_settings = |
1908 io_data->GetCookieSettings(); | 1908 io_data->GetCookieSettings(); |
1909 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && | 1909 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && |
1910 cookie_settings->IsSettingCookieAllowed(url, first_party_url); | 1910 cookie_settings->IsSettingCookieAllowed(url, first_party_url); |
1911 } | 1911 } |
1912 #endif // defined(ENABLE_WEBRTC) | 1912 #endif // defined(ENABLE_WEBRTC) |
1913 | 1913 |
| 1914 bool ChromeContentBrowserClient::AllowKeygen( |
| 1915 const GURL& url, |
| 1916 content::ResourceContext* context) { |
| 1917 HostContentSettingsMap* content_settings = |
| 1918 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap(); |
| 1919 |
| 1920 return content_settings->GetContentSetting( |
| 1921 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) == |
| 1922 CONTENT_SETTING_ALLOW; |
| 1923 } |
| 1924 |
1914 net::URLRequestContext* | 1925 net::URLRequestContext* |
1915 ChromeContentBrowserClient::OverrideRequestContextForURL( | 1926 ChromeContentBrowserClient::OverrideRequestContextForURL( |
1916 const GURL& url, content::ResourceContext* context) { | 1927 const GURL& url, content::ResourceContext* context) { |
1917 DCHECK_CURRENTLY_ON(BrowserThread::IO); | 1928 DCHECK_CURRENTLY_ON(BrowserThread::IO); |
1918 #if defined(ENABLE_EXTENSIONS) | 1929 #if defined(ENABLE_EXTENSIONS) |
1919 if (url.SchemeIs(extensions::kExtensionScheme)) { | 1930 if (url.SchemeIs(extensions::kExtensionScheme)) { |
1920 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); | 1931 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); |
1921 return io_data->extensions_request_context(); | 1932 return io_data->extensions_request_context(); |
1922 } | 1933 } |
1923 #endif | 1934 #endif |
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2760 if (channel <= kMaxDisableEncryptionChannel) { | 2771 if (channel <= kMaxDisableEncryptionChannel) { |
2761 static const char* const kWebRtcDevSwitchNames[] = { | 2772 static const char* const kWebRtcDevSwitchNames[] = { |
2762 switches::kDisableWebRtcEncryption, | 2773 switches::kDisableWebRtcEncryption, |
2763 }; | 2774 }; |
2764 to_command_line->CopySwitchesFrom(from_command_line, | 2775 to_command_line->CopySwitchesFrom(from_command_line, |
2765 kWebRtcDevSwitchNames, | 2776 kWebRtcDevSwitchNames, |
2766 arraysize(kWebRtcDevSwitchNames)); | 2777 arraysize(kWebRtcDevSwitchNames)); |
2767 } | 2778 } |
2768 } | 2779 } |
2769 #endif // defined(ENABLE_WEBRTC) | 2780 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |