summaryrefslogtreecommitdiffstats
path: root/android_webview/browser/aw_quota_permission_context.cc
blob: ce3a2c34945c2f351fc6ec17ec22ee94b88c02ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "android_webview/browser/aw_quota_permission_context.h"

#include "base/logging.h"

using content::QuotaPermissionContext;

namespace android_webview {

AwQuotaPermissionContext::AwQuotaPermissionContext() {
}

AwQuotaPermissionContext::~AwQuotaPermissionContext() {
}

void AwQuotaPermissionContext::RequestQuotaPermission(
    const GURL& origin_url,
    quota::StorageType type,
    int64 new_quota,
    int render_process_id,
    int render_view_id,
    const PermissionCallback& callback) {
  if (type != quota::kStorageTypePersistent) {
    callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
  } else {
    // TODO(boliu): Implement this to power
    // WebChromeClient.onExceededDatabaseQuota
    NOTIMPLEMENTED();
    callback.Run(QUOTA_PERMISSION_RESPONSE_CANCELLED);
  }
}

}  // namespace android_webview