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

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: Fixing ContentSetting Register. 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 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 content::ResourceContext* context) { 1911 content::ResourceContext* context) {
1912 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1912 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1913 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1913 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1914 content_settings::CookieSettings* cookie_settings = 1914 content_settings::CookieSettings* cookie_settings =
1915 io_data->GetCookieSettings(); 1915 io_data->GetCookieSettings();
1916 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) && 1916 return cookie_settings->IsReadingCookieAllowed(url, first_party_url) &&
1917 cookie_settings->IsSettingCookieAllowed(url, first_party_url); 1917 cookie_settings->IsSettingCookieAllowed(url, first_party_url);
1918 } 1918 }
1919 #endif // defined(ENABLE_WEBRTC) 1919 #endif // defined(ENABLE_WEBRTC)
1920 1920
1921 bool ChromeContentBrowserClient::AllowKeygen(
1922 const GURL& url,
1923 content::ResourceContext* context) {
1924 HostContentSettingsMap* content_settings =
1925 ProfileIOData::FromResourceContext(context)->GetHostContentSettingsMap();
1926
1927 return content_settings->GetContentSetting(
1928 url, url, CONTENT_SETTINGS_TYPE_KEYGEN, std::string()) ==
1929 CONTENT_SETTING_ALLOW;
1930 }
1931
1921 net::URLRequestContext* 1932 net::URLRequestContext*
1922 ChromeContentBrowserClient::OverrideRequestContextForURL( 1933 ChromeContentBrowserClient::OverrideRequestContextForURL(
1923 const GURL& url, content::ResourceContext* context) { 1934 const GURL& url, content::ResourceContext* context) {
1924 DCHECK_CURRENTLY_ON(BrowserThread::IO); 1935 DCHECK_CURRENTLY_ON(BrowserThread::IO);
1925 #if defined(ENABLE_EXTENSIONS) 1936 #if defined(ENABLE_EXTENSIONS)
1926 if (url.SchemeIs(extensions::kExtensionScheme)) { 1937 if (url.SchemeIs(extensions::kExtensionScheme)) {
1927 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 1938 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
1928 return io_data->extensions_request_context(); 1939 return io_data->extensions_request_context();
1929 } 1940 }
1930 #endif 1941 #endif
(...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after
2769 if (channel <= kMaxDisableEncryptionChannel) { 2780 if (channel <= kMaxDisableEncryptionChannel) {
2770 static const char* const kWebRtcDevSwitchNames[] = { 2781 static const char* const kWebRtcDevSwitchNames[] = {
2771 switches::kDisableWebRtcEncryption, 2782 switches::kDisableWebRtcEncryption,
2772 }; 2783 };
2773 to_command_line->CopySwitchesFrom(from_command_line, 2784 to_command_line->CopySwitchesFrom(from_command_line,
2774 kWebRtcDevSwitchNames, 2785 kWebRtcDevSwitchNames,
2775 arraysize(kWebRtcDevSwitchNames)); 2786 arraysize(kWebRtcDevSwitchNames));
2776 } 2787 }
2777 } 2788 }
2778 #endif // defined(ENABLE_WEBRTC) 2789 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | chrome/browser/content_settings/host_content_settings_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698