Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1417173010: Adding <keygen> Content Setting (core) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 content::ResourceContext* context) { 1905 content::ResourceContext* context) {
1906 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1906 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1907 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1907 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1908 content_settings::CookieSettings* cookie_settings = 1908 content_settings::CookieSettings* cookie_settings =
1909 io_data->GetCookieSettings(); 1909 io_data->GetCookieSettings();
1910 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && 1910 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) &&
1911 cookie_settings->IsSettingCookieAllowed(url, first_party_url); 1911 cookie_settings->IsSettingCookieAllowed(url, first_party_url);
1912 } 1912 }
1913 #endif // defined(ENABLE_WEBRTC) 1913 #endif // defined(ENABLE_WEBRTC)
1914 1914
1915 bool ChromeContentBrowserClient::AllowKeygen(
1916 const GURL& url,
1917 content::ResourceContext* context) {
1918 HostContentSettingsMap* content_settings =
1919 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
1920
1921 return content_settings->GetContentSetting(
1922 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) ==
1923 CONTENT_SETTING_ALLOW;
1924 }
1925
1915 net::URLRequestContext* 1926 net::URLRequestContext*
1916 ChromeContentBrowserClient::OverrideRequestContextForURL( 1927 ChromeContentBrowserClient::OverrideRequestContextForURL(
1917 const GURL& url, content::ResourceContext* context) { 1928 const GURL& url, content::ResourceContext* context) {
1918 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1929 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1919 #if defined(ENABLE_EXTENSIONS) 1930 #if defined(ENABLE_EXTENSIONS)
1920 if (url.SchemeIs(extensions::kExtensionScheme)) { 1931 if (url.SchemeIs(extensions::kExtensionScheme)) {
1921 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1932 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1922 return io_data->extensions_request_context(); 1933 return io_data->extensions_request_context();
1923 } 1934 }
1924 #endif 1935 #endif
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2763 if (channel <= kMaxDisableEncryptionChannel) { 2774 if (channel <= kMaxDisableEncryptionChannel) {
2764 static const char* const kWebRtcDevSwitchNames[] = { 2775 static const char* const kWebRtcDevSwitchNames[] = {
2765 switches::kDisableWebRtcEncryption, 2776 switches::kDisableWebRtcEncryption,
2766 }; 2777 };
2767 to_command_line->CopySwitchesFrom(from_command_line, 2778 to_command_line->CopySwitchesFrom(from_command_line,
2768 kWebRtcDevSwitchNames, 2779 kWebRtcDevSwitchNames,
2769 arraysize(kWebRtcDevSwitchNames)); 2780 arraysize(kWebRtcDevSwitchNames));
2770 } 2781 }
2771 } 2782 }
2772 #endif // defined(ENABLE_WEBRTC) 2783 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698