[email protected] | de7d61ff | 2013-08-20 11:30:41 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | de7d61ff | 2013-08-20 11:30:41 | [diff] [blame] | 5 | #include "content/shell/browser/shell_quota_permission_context.h" |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 6 | |
Blink Reformat | a30d423 | 2018-04-07 15:31:06 | [diff] [blame] | 7 | #include "third_party/blink/public/mojom/quota/quota_types.mojom.h" |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 8 | |
9 | namespace content { | ||||
10 | |||||
11 | ShellQuotaPermissionContext::ShellQuotaPermissionContext() {} | ||||
12 | |||||
13 | void ShellQuotaPermissionContext::RequestQuotaPermission( | ||||
[email protected] | f78aa772 | 2014-04-04 00:04:25 | [diff] [blame] | 14 | const StorageQuotaParams& params, |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 15 | int render_process_id, |
danakj | b8a784ea | 2019-12-10 14:51:44 | [diff] [blame] | 16 | PermissionCallback callback) { |
Sasha Bermeister | b8957f8 | 2018-01-04 04:17:40 | [diff] [blame] | 17 | if (params.storage_type != blink::mojom::StorageType::kPersistent) { |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 18 | // For now we only support requesting quota with this interface |
19 | // for Persistent storage type. | ||||
danakj | b8a784ea | 2019-12-10 14:51:44 | [diff] [blame] | 20 | std::move(callback).Run(QUOTA_PERMISSION_RESPONSE_DISALLOW); |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 21 | return; |
22 | } | ||||
23 | |||||
danakj | b8a784ea | 2019-12-10 14:51:44 | [diff] [blame] | 24 | std::move(callback).Run(QUOTA_PERMISSION_RESPONSE_ALLOW); |
[email protected] | fc41b21 | 2013-03-25 16:04:23 | [diff] [blame] | 25 | } |
26 | |||||
27 | ShellQuotaPermissionContext::~ShellQuotaPermissionContext() {} | ||||
28 | |||||
29 | } // namespace content |