| 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 16 matching lines...) Expand all Loading... |
| 27 #include "chrome/browser/browser_about_handler.h" | 27 #include "chrome/browser/browser_about_handler.h" |
| 28 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
| 29 #include "chrome/browser/browser_shutdown.h" | 29 #include "chrome/browser/browser_shutdown.h" |
| 30 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 30 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 31 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 31 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 32 #include "chrome/browser/character_encoding.h" | 32 #include "chrome/browser/character_encoding.h" |
| 33 #include "chrome/browser/chrome_content_browser_client_parts.h" | 33 #include "chrome/browser/chrome_content_browser_client_parts.h" |
| 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 34 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
| 35 #include "chrome/browser/chrome_quota_permission_context.h" | 35 #include "chrome/browser/chrome_quota_permission_context.h" |
| 36 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 36 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 37 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 37 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 38 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 38 #include "chrome/browser/defaults.h" | 39 #include "chrome/browser/defaults.h" |
| 39 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" | 40 #include "chrome/browser/devtools/chrome_devtools_manager_delegate.h" |
| 40 #include "chrome/browser/download/download_prefs.h" | 41 #include "chrome/browser/download/download_prefs.h" |
| 41 #include "chrome/browser/font_family_cache.h" | 42 #include "chrome/browser/font_family_cache.h" |
| 42 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 43 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
| 43 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 44 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
| 44 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 45 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
| 45 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 46 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 46 #include "chrome/browser/net/chrome_net_log.h" | 47 #include "chrome/browser/net/chrome_net_log.h" |
| (...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 | 887 |
| 887 RendererContentSettingRules rules; | 888 RendererContentSettingRules rules; |
| 888 if (host->IsForGuestsOnly()) { | 889 if (host->IsForGuestsOnly()) { |
| 889 #if defined(ENABLE_EXTENSIONS) | 890 #if defined(ENABLE_EXTENSIONS) |
| 890 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules); | 891 GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules); |
| 891 #else | 892 #else |
| 892 NOTREACHED(); | 893 NOTREACHED(); |
| 893 #endif | 894 #endif |
| 894 } else { | 895 } else { |
| 895 GetRendererContentSettingRules( | 896 GetRendererContentSettingRules( |
| 896 profile->GetHostContentSettingsMap(), &rules); | 897 HostContentSettingsMapFactory::GetForProfile(profile), &rules); |
| 897 } | 898 } |
| 898 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 899 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
| 899 } | 900 } |
| 900 | 901 |
| 901 GURL ChromeContentBrowserClient::GetEffectiveURL( | 902 GURL ChromeContentBrowserClient::GetEffectiveURL( |
| 902 content::BrowserContext* browser_context, const GURL& url) { | 903 content::BrowserContext* browser_context, const GURL& url) { |
| 903 Profile* profile = Profile::FromBrowserContext(browser_context); | 904 Profile* profile = Profile::FromBrowserContext(browser_context); |
| 904 if (!profile) | 905 if (!profile) |
| 905 return url; | 906 return url; |
| 906 | 907 |
| (...skipping 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1954 } | 1955 } |
| 1955 | 1956 |
| 1956 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); | 1957 GURL requesting_url("https://" + cert_request_info->host_and_port.ToString()); |
| 1957 DCHECK(requesting_url.is_valid()) | 1958 DCHECK(requesting_url.is_valid()) |
| 1958 << "Invalid URL string: https://" | 1959 << "Invalid URL string: https://" |
| 1959 << cert_request_info->host_and_port.ToString(); | 1960 << cert_request_info->host_and_port.ToString(); |
| 1960 | 1961 |
| 1961 Profile* profile = | 1962 Profile* profile = |
| 1962 Profile::FromBrowserContext(web_contents->GetBrowserContext()); | 1963 Profile::FromBrowserContext(web_contents->GetBrowserContext()); |
| 1963 scoped_ptr<base::Value> filter = | 1964 scoped_ptr<base::Value> filter = |
| 1964 profile->GetHostContentSettingsMap()->GetWebsiteSetting( | 1965 HostContentSettingsMapFactory::GetForProfile(profile)->GetWebsiteSetting( |
| 1965 requesting_url, | 1966 requesting_url, |
| 1966 requesting_url, | 1967 requesting_url, |
| 1967 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, | 1968 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, |
| 1968 std::string(), | 1969 std::string(), |
| 1969 NULL); | 1970 NULL); |
| 1970 | 1971 |
| 1971 if (filter.get()) { | 1972 if (filter.get()) { |
| 1972 // Try to automatically select a client certificate. | 1973 // Try to automatically select a client certificate. |
| 1973 if (filter->IsType(base::Value::TYPE_DICTIONARY)) { | 1974 if (filter->IsType(base::Value::TYPE_DICTIONARY)) { |
| 1974 base::DictionaryValue* filter_dict = | 1975 base::DictionaryValue* filter_dict = |
| (...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2670 switches::kDisableWebRtcEncryption, | 2671 switches::kDisableWebRtcEncryption, |
| 2671 }; | 2672 }; |
| 2672 to_command_line->CopySwitchesFrom(from_command_line, | 2673 to_command_line->CopySwitchesFrom(from_command_line, |
| 2673 kWebRtcDevSwitchNames, | 2674 kWebRtcDevSwitchNames, |
| 2674 arraysize(kWebRtcDevSwitchNames)); | 2675 arraysize(kWebRtcDevSwitchNames)); |
| 2675 } | 2676 } |
| 2676 } | 2677 } |
| 2677 #endif // defined(ENABLE_WEBRTC) | 2678 #endif // defined(ENABLE_WEBRTC) |
| 2678 | 2679 |
| 2679 } // namespace chrome | 2680 } // namespace chrome |
| OLD | NEW |