• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3 // found in the LICENSE file.
4 
5 #include "content/shell/browser/shell_quota_permission_context.h"
6 
7 #include "webkit/common/quota/quota_types.h"
8 
9 namespace content {
10 
ShellQuotaPermissionContext()11 ShellQuotaPermissionContext::ShellQuotaPermissionContext() {}
12 
RequestQuotaPermission(const StorageQuotaParams & params,int render_process_id,const PermissionCallback & callback)13 void ShellQuotaPermissionContext::RequestQuotaPermission(
14     const StorageQuotaParams& params,
15     int render_process_id,
16     const PermissionCallback& callback) {
17   if (params.storage_type != quota::kStorageTypePersistent) {
18     // For now we only support requesting quota with this interface
19     // for Persistent storage type.
20     callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
21     return;
22   }
23 
24   callback.Run(QUOTA_PERMISSION_RESPONSE_ALLOW);
25 }
26 
~ShellQuotaPermissionContext()27 ShellQuotaPermissionContext::~ShellQuotaPermissionContext() {}
28 
29 }  // namespace content
30