Index: chrome/browser/chrome_content_browser_client.cc |
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
index 9a39f749f390f2e987c6f02cd97539b6aa694d6f..6691172cac69efe32644d8efb925a846fec59e69 100644 |
--- a/chrome/browser/chrome_content_browser_client.cc |
+++ b/chrome/browser/chrome_content_browser_client.cc |
@@ -48,6 +48,7 @@ |
#include "chrome/browser/content_settings/tab_specific_content_settings.h" |
#include "chrome/browser/defaults.h" |
#include "chrome/browser/download/download_prefs.h" |
+#include "chrome/browser/engagement/site_engagement_eviction_policy.h" |
#include "chrome/browser/field_trial_recorder.h" |
#include "chrome/browser/font_family_cache.h" |
#include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
@@ -405,8 +406,6 @@ namespace { |
// thread. |
base::LazyInstance<std::string> g_io_thread_application_locale; |
-const storage::QuotaSettings* g_default_quota_settings; |
- |
#if BUILDFLAG(ENABLE_PLUGINS) |
// TODO(teravest): Add renderer-side API-specific checking for these APIs so |
// that blanket permission isn't granted to all dev channel APIs for these. |
@@ -2164,20 +2163,12 @@ ChromeContentBrowserClient::CreateQuotaPermissionContext() { |
return new ChromeQuotaPermissionContext(); |
} |
-void ChromeContentBrowserClient::GetQuotaSettings( |
- content::BrowserContext* context, |
- content::StoragePartition* partition, |
- const storage::OptionalQuotaSettingsCallback& callback) { |
- if (g_default_quota_settings) { |
- // For debugging tests harness can inject settings. |
- callback.Run(*g_default_quota_settings); |
- return; |
- } |
- content::BrowserThread::PostTaskAndReplyWithResult( |
- content::BrowserThread::FILE, FROM_HERE, |
- base::Bind(&storage::CalculateNominalDynamicSettings, |
- partition->GetPath(), context->IsOffTheRecord()), |
- callback); |
+std::unique_ptr<storage::QuotaEvictionPolicy> |
+ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy( |
+ content::BrowserContext* context) { |
+ return SiteEngagementEvictionPolicy::IsEnabled() |
+ ? base::MakeUnique<SiteEngagementEvictionPolicy>(context) |
+ : nullptr; |
} |
void ChromeContentBrowserClient::AllowCertificateError( |
@@ -3379,9 +3370,3 @@ bool ChromeContentBrowserClient:: |
return variations::GetVariationParamValue( |
"BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
} |
- |
-// static |
-void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
- const storage::QuotaSettings* settings) { |
- g_default_quota_settings = settings; |
-} |