summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_quota_permission_context.h
blob: 895d4af39513fc9c0697d798b2a0a08fe4c0bf14 (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
// 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.

#ifndef CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_
#define CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_

#include "base/compiler_specific.h"
#include "content/public/browser/quota_permission_context.h"

class ChromeQuotaPermissionContext : public content::QuotaPermissionContext {
 public:
  ChromeQuotaPermissionContext();

  // The callback will be dispatched on the IO thread.
  virtual void RequestQuotaPermission(
      const GURL& origin_url,
      quota::StorageType type,
      int64 new_quota,
      int render_process_id,
      int render_view_id,
      const PermissionCallback& callback) OVERRIDE;

  void DispatchCallbackOnIOThread(
      const PermissionCallback& callback,
      QuotaPermissionResponse response);

 private:
  virtual ~ChromeQuotaPermissionContext();
};

#endif  // CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_