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 <set> | 7 #include <set> |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... | |
34 #include "chrome/browser/download/download_prefs.h" | 34 #include "chrome/browser/download/download_prefs.h" |
35 #include "chrome/browser/font_family_cache.h" | 35 #include "chrome/browser/font_family_cache.h" |
36 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 36 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
37 #include "chrome/browser/geolocation/geolocation_permission_context.h" | 37 #include "chrome/browser/geolocation/geolocation_permission_context.h" |
38 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" | 38 #include "chrome/browser/geolocation/geolocation_permission_context_factory.h" |
39 #include "chrome/browser/media/media_capture_devices_dispatcher.h" | 39 #include "chrome/browser/media/media_capture_devices_dispatcher.h" |
40 #include "chrome/browser/media/midi_permission_context.h" | 40 #include "chrome/browser/media/midi_permission_context.h" |
41 #include "chrome/browser/media/midi_permission_context_factory.h" | 41 #include "chrome/browser/media/midi_permission_context_factory.h" |
42 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 42 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
43 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 43 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
44 #include "chrome/browser/net/certificate_error_reporter.h" | |
44 #include "chrome/browser/net/chrome_net_log.h" | 45 #include "chrome/browser/net/chrome_net_log.h" |
45 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | 46 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" |
46 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" | 47 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings_fact ory.h" |
47 #include "chrome/browser/notifications/desktop_notification_service.h" | 48 #include "chrome/browser/notifications/desktop_notification_service.h" |
48 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 49 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
49 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 50 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
50 #include "chrome/browser/platform_util.h" | 51 #include "chrome/browser/platform_util.h" |
51 #include "chrome/browser/prerender/prerender_final_status.h" | 52 #include "chrome/browser/prerender/prerender_final_status.h" |
52 #include "chrome/browser/prerender/prerender_manager.h" | 53 #include "chrome/browser/prerender/prerender_manager.h" |
53 #include "chrome/browser/prerender/prerender_manager_factory.h" | 54 #include "chrome/browser/prerender/prerender_manager_factory.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 #include "gin/public/isolate_holder.h" | 131 #include "gin/public/isolate_holder.h" |
131 #include "net/base/mime_util.h" | 132 #include "net/base/mime_util.h" |
132 #include "net/cookies/canonical_cookie.h" | 133 #include "net/cookies/canonical_cookie.h" |
133 #include "net/cookies/cookie_options.h" | 134 #include "net/cookies/cookie_options.h" |
134 #include "net/ssl/ssl_cert_request_info.h" | 135 #include "net/ssl/ssl_cert_request_info.h" |
135 #include "ppapi/host/ppapi_host.h" | 136 #include "ppapi/host/ppapi_host.h" |
136 #include "storage/browser/fileapi/external_mount_points.h" | 137 #include "storage/browser/fileapi/external_mount_points.h" |
137 #include "ui/base/l10n/l10n_util.h" | 138 #include "ui/base/l10n/l10n_util.h" |
138 #include "ui/base/resource/resource_bundle.h" | 139 #include "ui/base/resource/resource_bundle.h" |
139 #include "ui/resources/grit/ui_resources.h" | 140 #include "ui/resources/grit/ui_resources.h" |
141 #include "url/gurl.h" | |
140 | 142 |
141 #if defined(OS_WIN) | 143 #if defined(OS_WIN) |
142 #include "base/win/windows_version.h" | 144 #include "base/win/windows_version.h" |
143 #include "chrome/browser/chrome_browser_main_win.h" | 145 #include "chrome/browser/chrome_browser_main_win.h" |
144 #include "sandbox/win/src/sandbox_policy.h" | 146 #include "sandbox/win/src/sandbox_policy.h" |
145 #elif defined(OS_MACOSX) | 147 #elif defined(OS_MACOSX) |
146 #include "chrome/browser/chrome_browser_main_mac.h" | 148 #include "chrome/browser/chrome_browser_main_mac.h" |
147 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 149 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
148 #include "components/crash/app/breakpad_mac.h" | 150 #include "components/crash/app/breakpad_mac.h" |
149 #elif defined(OS_CHROMEOS) | 151 #elif defined(OS_CHROMEOS) |
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
691 } // namespace | 693 } // namespace |
692 | 694 |
693 namespace chrome { | 695 namespace chrome { |
694 | 696 |
695 ChromeContentBrowserClient::ChromeContentBrowserClient() | 697 ChromeContentBrowserClient::ChromeContentBrowserClient() |
696 : | 698 : |
697 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 699 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
698 v8_natives_fd_(-1), | 700 v8_natives_fd_(-1), |
699 v8_snapshot_fd_(-1), | 701 v8_snapshot_fd_(-1), |
700 #endif // OS_POSIX && !OS_MACOSX | 702 #endif // OS_POSIX && !OS_MACOSX |
703 certificate_error_reporter_( | |
704 new chrome_browser_net::CertificateErrorReporter( | |
705 GURL(chrome_browser_net::kExtendedReportingUploadUrl))), | |
701 weak_factory_(this) { | 706 weak_factory_(this) { |
702 #if defined(ENABLE_PLUGINS) | 707 #if defined(ENABLE_PLUGINS) |
703 for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i) | 708 for (size_t i = 0; i < arraysize(kPredefinedAllowedDevChannelOrigins); ++i) |
704 allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]); | 709 allowed_dev_channel_origins_.insert(kPredefinedAllowedDevChannelOrigins[i]); |
705 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) | 710 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) |
706 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); | 711 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); |
707 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) | 712 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) |
708 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); | 713 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); |
709 | 714 |
710 extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); | 715 extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1840 // Otherwise, display an SSL blocking page. The interstitial page takes | 1845 // Otherwise, display an SSL blocking page. The interstitial page takes |
1841 // ownership of ssl_blocking_page. | 1846 // ownership of ssl_blocking_page. |
1842 int options_mask = 0; | 1847 int options_mask = 0; |
1843 if (overridable) | 1848 if (overridable) |
1844 options_mask |= SSLBlockingPage::OVERRIDABLE; | 1849 options_mask |= SSLBlockingPage::OVERRIDABLE; |
1845 if (strict_enforcement) | 1850 if (strict_enforcement) |
1846 options_mask |= SSLBlockingPage::STRICT_ENFORCEMENT; | 1851 options_mask |= SSLBlockingPage::STRICT_ENFORCEMENT; |
1847 if (expired_previous_decision) | 1852 if (expired_previous_decision) |
1848 options_mask |= SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED; | 1853 options_mask |= SSLBlockingPage::EXPIRED_BUT_PREVIOUSLY_ALLOWED; |
1849 | 1854 |
1850 SSLErrorHandler::HandleSSLError( | 1855 SSLErrorHandler::HandleSSLError(tab, cert_error, ssl_info, request_url, |
Ryan Sleevi
2015/03/14 03:09:42
I suspect that in HandleSSLError, it would grab th
| |
1851 tab, cert_error, ssl_info, request_url, options_mask, callback); | 1856 options_mask, certificate_error_reporter_, |
1857 callback); | |
1852 } | 1858 } |
1853 | 1859 |
1854 void ChromeContentBrowserClient::SelectClientCertificate( | 1860 void ChromeContentBrowserClient::SelectClientCertificate( |
1855 int render_process_id, | 1861 int render_process_id, |
1856 int render_frame_id, | 1862 int render_frame_id, |
1857 net::SSLCertRequestInfo* cert_request_info, | 1863 net::SSLCertRequestInfo* cert_request_info, |
1858 const base::Callback<void(net::X509Certificate*)>& callback) { | 1864 const base::Callback<void(net::X509Certificate*)>& callback) { |
1859 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( | 1865 content::RenderFrameHost* rfh = content::RenderFrameHost::FromID( |
1860 render_process_id, render_frame_id); | 1866 render_process_id, render_frame_id); |
1861 WebContents* tab = WebContents::FromRenderFrameHost(rfh); | 1867 WebContents* tab = WebContents::FromRenderFrameHost(rfh); |
(...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2643 switches::kDisableWebRtcEncryption, | 2649 switches::kDisableWebRtcEncryption, |
2644 }; | 2650 }; |
2645 to_command_line->CopySwitchesFrom(from_command_line, | 2651 to_command_line->CopySwitchesFrom(from_command_line, |
2646 kWebRtcDevSwitchNames, | 2652 kWebRtcDevSwitchNames, |
2647 arraysize(kWebRtcDevSwitchNames)); | 2653 arraysize(kWebRtcDevSwitchNames)); |
2648 } | 2654 } |
2649 } | 2655 } |
2650 #endif // defined(ENABLE_WEBRTC) | 2656 #endif // defined(ENABLE_WEBRTC) |
2651 | 2657 |
2652 } // namespace chrome | 2658 } // namespace chrome |
OLD | NEW |