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

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: removed QuotaEvictionPolicy 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/permissions/permission_context_base.h" 59 #include "chrome/browser/permissions/permission_context_base.h"
61 #include "chrome/browser/platform_util.h" 60 #include "chrome/browser/platform_util.h"
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 #endif 2104 #endif
2106 2105
2107 return NULL; 2106 return NULL;
2108 } 2107 }
2109 2108
2110 QuotaPermissionContext* 2109 QuotaPermissionContext*
2111 ChromeContentBrowserClient::CreateQuotaPermissionContext() { 2110 ChromeContentBrowserClient::CreateQuotaPermissionContext() {
2112 return new ChromeQuotaPermissionContext(); 2111 return new ChromeQuotaPermissionContext();
2113 } 2112 }
2114 2113
2115 std::unique_ptr<storage::QuotaEvictionPolicy> 2114 void ChromeContentBrowserClient::GetQuotaSettings(
2116 ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( 2115 content::BrowserContext* context,
2117 content::BrowserContext* context) { 2116 content::StoragePartition* partition,
2118 return SiteEngagementEvictionPolicy::IsEnabled() 2117 const storage::OptionalQuotaSettingsCallback& callback) {
2119 ? base::MakeUnique<SiteEngagementEvictionPolicy>(context) 2118 content::BrowserThread::PostTaskAndReplyWithResult(
2120 : nullptr; 2119 content::BrowserThread::FILE, FROM_HERE,
2120 base::Bind(&storage::CalculateNominalDynamicSettings,
2121 partition->GetPath(), context->IsOffTheRecord()),
2122 callback);
2121 } 2123 }
2122 2124
2123 void ChromeContentBrowserClient::AllowCertificateError( 2125 void ChromeContentBrowserClient::AllowCertificateError(
2124 content::WebContents* web_contents, 2126 content::WebContents* web_contents,
2125 int cert_error, 2127 int cert_error,
2126 const net::SSLInfo& ssl_info, 2128 const net::SSLInfo& ssl_info,
2127 const GURL& request_url, 2129 const GURL& request_url,
2128 ResourceType resource_type, 2130 ResourceType resource_type,
2129 bool overridable, 2131 bool overridable,
2130 bool strict_enforcement, 2132 bool strict_enforcement,
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after
3238 kWebRtcDevSwitchNames, 3240 kWebRtcDevSwitchNames,
3239 arraysize(kWebRtcDevSwitchNames)); 3241 arraysize(kWebRtcDevSwitchNames));
3240 } 3242 }
3241 } 3243 }
3242 #endif // defined(ENABLE_WEBRTC) 3244 #endif // defined(ENABLE_WEBRTC)
3243 3245
3244 std::unique_ptr<content::MemoryCoordinatorDelegate> 3246 std::unique_ptr<content::MemoryCoordinatorDelegate>
3245 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() { 3247 ChromeContentBrowserClient::GetMemoryCoordinatorDelegate() {
3246 return memory::ChromeMemoryCoordinatorDelegate::Create(); 3248 return memory::ChromeMemoryCoordinatorDelegate::Create();
3247 } 3249 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698