| 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 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/budget_service/budget_service_impl.h" | 41 #include "chrome/browser/budget_service/budget_service_impl.h" |
| 42 #include "chrome/browser/character_encoding.h" | 42 #include "chrome/browser/character_encoding.h" |
| 43 #include "chrome/browser/chrome_content_browser_client_parts.h" | 43 #include "chrome/browser/chrome_content_browser_client_parts.h" |
| 44 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 44 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
| 45 #include "chrome/browser/chrome_quota_permission_context.h" | 45 #include "chrome/browser/chrome_quota_permission_context.h" |
| 46 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 46 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 47 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 47 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 48 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 48 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 49 #include "chrome/browser/defaults.h" | 49 #include "chrome/browser/defaults.h" |
| 50 #include "chrome/browser/download/download_prefs.h" | 50 #include "chrome/browser/download/download_prefs.h" |
| 51 #include "chrome/browser/engagement/site_engagement_eviction_policy.h" | |
| 52 #include "chrome/browser/font_family_cache.h" | 51 #include "chrome/browser/font_family_cache.h" |
| 53 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 52 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
| 54 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" | 53 #include "chrome/browser/memory/chrome_memory_coordinator_delegate.h" |
| 55 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" | 54 #include "chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.h" |
| 56 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 55 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
| 57 #include "chrome/browser/notifications/platform_notification_service_impl.h" | 56 #include "chrome/browser/notifications/platform_notification_service_impl.h" |
| 58 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" | 57 #include "chrome/browser/page_load_metrics/metrics_navigation_throttle.h" |
| 59 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 58 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
| 60 #include "chrome/browser/payments/payment_request_impl.h" | 59 #include "chrome/browser/payments/payment_request_impl.h" |
| 61 #include "chrome/browser/permissions/permission_context_base.h" | 60 #include "chrome/browser/permissions/permission_context_base.h" |
| (...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2144 #endif | 2143 #endif |
| 2145 | 2144 |
| 2146 return NULL; | 2145 return NULL; |
| 2147 } | 2146 } |
| 2148 | 2147 |
| 2149 QuotaPermissionContext* | 2148 QuotaPermissionContext* |
| 2150 ChromeContentBrowserClient::CreateQuotaPermissionContext() { | 2149 ChromeContentBrowserClient::CreateQuotaPermissionContext() { |
| 2151 return new ChromeQuotaPermissionContext(); | 2150 return new ChromeQuotaPermissionContext(); |
| 2152 } | 2151 } |
| 2153 | 2152 |
| 2154 std::unique_ptr<storage::QuotaEvictionPolicy> | 2153 void ChromeContentBrowserClient::GetQuotaSettings( |
| 2155 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( | 2154 content::BrowserContext* context, |
| 2156 content::BrowserContext* context) { | 2155 content::StoragePartition* partition, |
| 2157 return SiteEngagementEvictionPolicy::IsEnabled() | 2156 const storage::OptionalQuotaSettingsCallback& callback) { |
| 2158 ? base::MakeUnique<SiteEngagementEvictionPolicy>(context) | 2157 content::BrowserThread::PostTaskAndReplyWithResult( |
| 2159 : nullptr; | 2158 content::BrowserThread::FILE, FROM_HERE, |
| 2159 base::Bind(&storage::CalculateNominalDynamicSettings, |
| 2160 partition->GetPath(), context->IsOffTheRecord()), |
| 2161 callback); |
| 2160 } | 2162 } |
| 2161 | 2163 |
| 2162 void ChromeContentBrowserClient::AllowCertificateError( | 2164 void ChromeContentBrowserClient::AllowCertificateError( |
| 2163 content::WebContents* web_contents, | 2165 content::WebContents* web_contents, |
| 2164 int cert_error, | 2166 int cert_error, |
| 2165 const net::SSLInfo& ssl_info, | 2167 const net::SSLInfo& ssl_info, |
| 2166 const GURL& request_url, | 2168 const GURL& request_url, |
| 2167 ResourceType resource_type, | 2169 ResourceType resource_type, |
| 2168 bool overridable, | 2170 bool overridable, |
| 2169 bool strict_enforcement, | 2171 bool strict_enforcement, |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3299 render_frame_host, std::move(source), std::move(request)); | 3301 render_frame_host, std::move(source), std::move(request)); |
| 3300 #else | 3302 #else |
| 3301 // Chrome's media remoting implementation depends on the Media Router | 3303 // Chrome's media remoting implementation depends on the Media Router |
| 3302 // infrastructure to identify remote sinks and provide the user interface for | 3304 // infrastructure to identify remote sinks and provide the user interface for |
| 3303 // sink selection. In the case where the Media Router is not present, simply | 3305 // sink selection. In the case where the Media Router is not present, simply |
| 3304 // drop the interface request. This will prevent code paths for media remoting | 3306 // drop the interface request. This will prevent code paths for media remoting |
| 3305 // in the renderer process from activating. | 3307 // in the renderer process from activating. |
| 3306 #endif | 3308 #endif |
| 3307 } | 3309 } |
| 3308 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) | 3310 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| OLD | NEW |