| 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 793cedd756347b76ec64b3553f8207a0b2132c27..a6c45c80e9dad78452c80682e537555eafc289d9 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -48,7 +48,6 @@
|
| #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"
|
| @@ -403,6 +402,8 @@ 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.
|
| @@ -2157,12 +2158,20 @@ ChromeContentBrowserClient::CreateQuotaPermissionContext() {
|
| return new ChromeQuotaPermissionContext();
|
| }
|
|
|
| -std::unique_ptr<storage::QuotaEvictionPolicy>
|
| -ChromeContentBrowserClient::GetTemporaryStorageEvictionPolicy(
|
| - content::BrowserContext* context) {
|
| - return SiteEngagementEvictionPolicy::IsEnabled()
|
| - ? base::MakeUnique<SiteEngagementEvictionPolicy>(context)
|
| - : nullptr;
|
| +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);
|
| }
|
|
|
| void ChromeContentBrowserClient::AllowCertificateError(
|
| @@ -3348,3 +3357,9 @@ void ChromeContentBrowserClient::
|
| task_scheduler_util::variations::
|
| MaybePerformBrowserTaskSchedulerRedirection();
|
| }
|
| +
|
| +//static
|
| +void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
|
| + const storage::QuotaSettings* settings) {
|
| + g_default_quota_settings = settings;
|
| +}
|
|
|