blob: 840980b27d19c6463e852d395f5a3c9ed203a332 [file] [log] [blame]
[email protected]de7d61ff2013-08-20 11:30:411// Copyright 2013 The Chromium Authors. All rights reserved.
[email protected]fc41b212013-03-25 16:04:232// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]de7d61ff2013-08-20 11:30:415#include "content/shell/browser/shell_quota_permission_context.h"
[email protected]fc41b212013-03-25 16:04:236
Blink Reformata30d4232018-04-07 15:31:067#include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
[email protected]fc41b212013-03-25 16:04:238
9namespace content {
10
11ShellQuotaPermissionContext::ShellQuotaPermissionContext() {}
12
13void ShellQuotaPermissionContext::RequestQuotaPermission(
[email protected]f78aa7722014-04-04 00:04:2514 const StorageQuotaParams& params,
[email protected]fc41b212013-03-25 16:04:2315 int render_process_id,
danakjb8a784ea2019-12-10 14:51:4416 PermissionCallback callback) {
Sasha Bermeisterb8957f82018-01-04 04:17:4017 if (params.storage_type != blink::mojom::StorageType::kPersistent) {
[email protected]fc41b212013-03-25 16:04:2318 // For now we only support requesting quota with this interface
19 // for Persistent storage type.
danakjb8a784ea2019-12-10 14:51:4420 std::move(callback).Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
[email protected]fc41b212013-03-25 16:04:2321 return;
22 }
23
danakjb8a784ea2019-12-10 14:51:4424 std::move(callback).Run(QUOTA_PERMISSION_RESPONSE_ALLOW);
[email protected]fc41b212013-03-25 16:04:2325}
26
27ShellQuotaPermissionContext::~ShellQuotaPermissionContext() {}
28
29} // namespace content