OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/browser/shell_quota_permission_context.h" | 5 #include "content/shell/browser/shell_quota_permission_context.h" |
6 | 6 |
7 #include "webkit/common/quota/quota_types.h" | 7 #include "webkit/common/quota/quota_types.h" |
8 | 8 |
9 namespace content { | 9 namespace content { |
10 | 10 |
11 ShellQuotaPermissionContext::ShellQuotaPermissionContext() {} | 11 ShellQuotaPermissionContext::ShellQuotaPermissionContext() {} |
12 | 12 |
13 void ShellQuotaPermissionContext::RequestQuotaPermission( | 13 void ShellQuotaPermissionContext::RequestQuotaPermission( |
14 const GURL& origin_url, | 14 const StorageQuotaParams& params, |
15 quota::StorageType type, | |
16 int64 requested_quota, | |
17 int render_process_id, | 15 int render_process_id, |
18 int render_view_id, | |
19 const PermissionCallback& callback) { | 16 const PermissionCallback& callback) { |
20 if (type != quota::kStorageTypePersistent) { | 17 if (params.storage_type != quota::kStorageTypePersistent) { |
21 // For now we only support requesting quota with this interface | 18 // For now we only support requesting quota with this interface |
22 // for Persistent storage type. | 19 // for Persistent storage type. |
23 callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW); | 20 callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW); |
24 return; | 21 return; |
25 } | 22 } |
26 | 23 |
27 callback.Run(QUOTA_PERMISSION_RESPONSE_ALLOW); | 24 callback.Run(QUOTA_PERMISSION_RESPONSE_ALLOW); |
28 } | 25 } |
29 | 26 |
30 ShellQuotaPermissionContext::~ShellQuotaPermissionContext() {} | 27 ShellQuotaPermissionContext::~ShellQuotaPermissionContext() {} |
31 | 28 |
32 } // namespace content | 29 } // namespace content |
OLD | NEW |