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

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

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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 30 matching lines...) Expand all
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 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 #endif 2141 #endif
2143 2142
2144 return NULL; 2143 return NULL;
2145 } 2144 }
2146 2145
2147 QuotaPermissionContext* 2146 QuotaPermissionContext*
2148 ChromeContentBrowserClient::CreateQuotaPermissionContext() { 2147 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
2149 return new ChromeQuotaPermissionContext(); 2148 return new ChromeQuotaPermissionContext();
2150 } 2149 }
2151 2150
2152 std::unique_ptr<storage::QuotaEvictionPolicy> 2151 void ChromeContentBrowserClient::GetQuotaSettings(
2153 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( 2152 content::BrowserContext* context,
2154 content::BrowserContext* context) { 2153 content::StoragePartition* partition,
2155 return SiteEngagementEvictionPolicy::IsEnabled() 2154 const storage::OptionalQuotaSettingsCallback& callback) {
2156 ? base::MakeUnique<SiteEngagementEvictionPolicy>(context) 2155 content::BrowserThread::PostTaskAndReplyWithResult(
2157 : nullptr; 2156 content::BrowserThread::FILE, FROM_HERE,
2157 base::Bind(&storage::CalculateNominalDynamicSettings,
2158 partition->GetPath(), context->IsOffTheRecord()),
2159 callback);
2158 } 2160 }
2159 2161
2160 void ChromeContentBrowserClient::AllowCertificateError( 2162 void ChromeContentBrowserClient::AllowCertificateError(
2161 content::WebContents* web_contents, 2163 content::WebContents* web_contents,
2162 int cert_error, 2164 int cert_error,
2163 const net::SSLInfo& ssl_info, 2165 const net::SSLInfo& ssl_info,
2164 const GURL& request_url, 2166 const GURL& request_url,
2165 ResourceType resource_type, 2167 ResourceType resource_type,
2166 bool overridable, 2168 bool overridable,
2167 bool strict_enforcement, 2169 bool strict_enforcement,
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
3297 render_frame_host, std::move(source), std::move(request)); 3299 render_frame_host, std::move(source), std::move(request));
3298 #else 3300 #else
3299 // Chrome's media remoting implementation depends on the Media Router 3301 // Chrome's media remoting implementation depends on the Media Router
3300 // infrastructure to identify remote sinks and provide the user interface for 3302 // infrastructure to identify remote sinks and provide the user interface for
3301 // sink selection. In the case where the Media Router is not present, simply 3303 // sink selection. In the case where the Media Router is not present, simply
3302 // drop the interface request. This will prevent code paths for media remoting 3304 // drop the interface request. This will prevent code paths for media remoting
3303 // in the renderer process from activating. 3305 // in the renderer process from activating.
3304 #endif 3306 #endif
3305 } 3307 }
3306 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3308 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698