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

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 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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after
2146 #endif 2145 #endif
2147 2146
2148 return NULL; 2147 return NULL;
2149 } 2148 }
2150 2149
2151 QuotaPermissionContext* 2150 QuotaPermissionContext*
2152 ChromeContentBrowserClient::CreateQuotaPermissionContext() { 2151 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
2153 return new ChromeQuotaPermissionContext(); 2152 return new ChromeQuotaPermissionContext();
2154 } 2153 }
2155 2154
2156 std::unique_ptr<storage::QuotaEvictionPolicy> 2155 void ChromeContentBrowserClient::GetQuotaSettings(
2157 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( 2156 content::BrowserContext* context,
2158 content::BrowserContext* context) { 2157 content::StoragePartition* partition,
2159 return SiteEngagementEvictionPolicy::IsEnabled() 2158 const storage::OptionalQuotaSettingsCallback& callback) {
2160 ? base::MakeUnique<SiteEngagementEvictionPolicy>(context) 2159 content::BrowserThread::PostTaskAndReplyWithResult(
2161 : nullptr; 2160 content::BrowserThread::FILE, FROM_HERE,
2161 base::Bind(&storage::CalculateNominalDynamicSettings,
2162 partition->GetPath(), context->IsOffTheRecord()),
2163 callback);
2162 } 2164 }
2163 2165
2164 void ChromeContentBrowserClient::AllowCertificateError( 2166 void ChromeContentBrowserClient::AllowCertificateError(
2165 content::WebContents* web_contents, 2167 content::WebContents* web_contents,
2166 int cert_error, 2168 int cert_error,
2167 const net::SSLInfo& ssl_info, 2169 const net::SSLInfo& ssl_info,
2168 const GURL& request_url, 2170 const GURL& request_url,
2169 ResourceType resource_type, 2171 ResourceType resource_type,
2170 bool overridable, 2172 bool overridable,
2171 bool strict_enforcement, 2173 bool strict_enforcement,
(...skipping 1143 matching lines...) Expand 10 before | Expand all | Expand 10 after
3315 render_frame_host, std::move(source), std::move(request)); 3317 render_frame_host, std::move(source), std::move(request));
3316 #else 3318 #else
3317 // Chrome's media remoting implementation depends on the Media Router 3319 // Chrome's media remoting implementation depends on the Media Router
3318 // infrastructure to identify remote sinks and provide the user interface for 3320 // infrastructure to identify remote sinks and provide the user interface for
3319 // sink selection. In the case where the Media Router is not present, simply 3321 // sink selection. In the case where the Media Router is not present, simply
3320 // drop the interface request. This will prevent code paths for media remoting 3322 // drop the interface request. This will prevent code paths for media remoting
3321 // in the renderer process from activating. 3323 // in the renderer process from activating.
3322 #endif 3324 #endif
3323 } 3325 }
3324 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING) 3326 #endif // BUILDFLAG(ENABLE_MEDIA_REMOTING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698