Commit 31c1924e authored by John Abd-El-Malek's avatar John Abd-El-Malek Committed by Commit Bot

Use default quota for WebLayer for indexeddb and service worker.

This matches Chrome & WebView, which fixes websites that use cache storage. This cl is meant to be small and self-contained so that it can be merged safely. I'll work on making this more generic in a followup.

Bug: 1035420
Change-Id: I692f685569427e0d5277c97d5fca658cd2b56897
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1976550
Auto-Submit: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#726454}
parent feeb6865
...@@ -22,6 +22,7 @@ include_rules = [ ...@@ -22,6 +22,7 @@ include_rules = [
"+services/network/network_service.h", "+services/network/network_service.h",
"+services/network/public", "+services/network/public",
"+services/service_manager", "+services/service_manager",
"+storage/browser/quota",
"+third_party/blink/public/common", "+third_party/blink/public/common",
"+third_party/blink/public/mojom", "+third_party/blink/public/mojom",
"+ui/aura", "+ui/aura",
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "content/public/browser/generated_code_cache_settings.h" #include "content/public/browser/generated_code_cache_settings.h"
#include "content/public/browser/navigation_throttle.h" #include "content/public/browser/navigation_throttle.h"
#include "content/public/browser/network_service_instance.h" #include "content/public/browser/network_service_instance.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/service_names.mojom.h" #include "content/public/common/service_names.mojom.h"
#include "content/public/common/user_agent.h" #include "content/public/common/user_agent.h"
...@@ -31,6 +32,7 @@ ...@@ -31,6 +32,7 @@
#include "services/network/network_service.h" #include "services/network/network_service.h"
#include "services/network/public/mojom/network_context.mojom.h" #include "services/network/public/mojom/network_context.mojom.h"
#include "services/network/public/mojom/network_service.mojom.h" #include "services/network/public/mojom/network_service.mojom.h"
#include "storage/browser/quota/quota_settings.h"
#include "third_party/blink/public/common/loader/url_loader_throttle.h" #include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "url/gurl.h" #include "url/gurl.h"
...@@ -352,6 +354,15 @@ void ContentBrowserClientImpl::ExposeInterfacesToRenderer( ...@@ -352,6 +354,15 @@ void ContentBrowserClientImpl::ExposeInterfacesToRenderer(
#endif // defined(OS_ANDROID) #endif // defined(OS_ANDROID)
} }
void ContentBrowserClientImpl::GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,
base::OnceCallback<void(base::Optional<storage::QuotaSettings>)> callback) {
storage::GetNominalDynamicSettings(
partition->GetPath(), context->IsOffTheRecord(),
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
SafeBrowsingService* ContentBrowserClientImpl::GetSafeBrowsingService() { SafeBrowsingService* ContentBrowserClientImpl::GetSafeBrowsingService() {
if (!safe_browsing_service_) { if (!safe_browsing_service_) {
......
...@@ -74,6 +74,11 @@ class ContentBrowserClientImpl : public content::ContentBrowserClient { ...@@ -74,6 +74,11 @@ class ContentBrowserClientImpl : public content::ContentBrowserClient {
service_manager::BinderRegistry* registry, service_manager::BinderRegistry* registry,
blink::AssociatedInterfaceRegistry* associated_registry, blink::AssociatedInterfaceRegistry* associated_registry,
content::RenderProcessHost* render_process_host) override; content::RenderProcessHost* render_process_host) override;
void GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,
base::OnceCallback<void(base::Optional<storage::QuotaSettings>)> callback)
override;
#if defined(OS_LINUX) || defined(OS_ANDROID) #if defined(OS_LINUX) || defined(OS_ANDROID)
void GetAdditionalMappedFilesForChildProcess( void GetAdditionalMappedFilesForChildProcess(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment