Fix IndexedDB quota (issue #2070)

This commit is contained in:
Marshall Greenblatt 2017-04-27 14:59:31 -04:00
parent 4fe6ac0d4b
commit 6a603af993
2 changed files with 19 additions and 0 deletions

View File

@ -51,7 +51,9 @@
#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
#include "content/browser/plugin_service_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/client_certificate_delegate.h"
#include "content/public/browser/navigation_handle.h"
@ -63,6 +65,7 @@
#include "content/public/browser/render_widget_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/service_names.mojom.h"
#include "content/public/common/storage_quota_params.h"
@ -76,6 +79,7 @@
#include "extensions/common/switches.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
#include "storage/browser/quota/quota_settings.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
@ -722,6 +726,17 @@ content::QuotaPermissionContext*
return new CefQuotaPermissionContext();
}
void CefContentBrowserClient::GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,
const storage::OptionalQuotaSettingsCallback& callback) {
content::BrowserThread::PostTaskAndReplyWithResult(
content::BrowserThread::FILE, FROM_HERE,
base::Bind(&storage::CalculateNominalDynamicSettings,
partition->GetPath(), context->IsOffTheRecord()),
callback);
}
content::MediaObserver* CefContentBrowserClient::GetMediaObserver() {
return CefMediaCaptureDevicesDispatcher::GetInstance();
}

View File

@ -56,6 +56,10 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
int child_process_id) override;
content::QuotaPermissionContext*
CreateQuotaPermissionContext() override;
void GetQuotaSettings(
content::BrowserContext* context,
content::StoragePartition* partition,
const storage::OptionalQuotaSettingsCallback& callback) override;
content::MediaObserver* GetMediaObserver() override;
content::SpeechRecognitionManagerDelegate*
CreateSpeechRecognitionManagerDelegate() override;