[email protected] | 9f9749a | 2012-03-02 19:37:00 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [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 | |||||
5 | #ifndef CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_ | ||||
6 | #define CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_ | ||||
7 | |||||
8 | #include "base/compiler_specific.h" | ||||
[email protected] | 9f9749a | 2012-03-02 19:37:00 | [diff] [blame] | 9 | #include "content/public/browser/quota_permission_context.h" |
pilgrim | 1633055 | 2014-09-10 01:32:22 | [diff] [blame] | 10 | #include "storage/common/quota/quota_types.h" |
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [diff] [blame] | 11 | |
[email protected] | 9f9749a | 2012-03-02 19:37:00 | [diff] [blame] | 12 | class ChromeQuotaPermissionContext : public content::QuotaPermissionContext { |
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [diff] [blame] | 13 | public: |
14 | ChromeQuotaPermissionContext(); | ||||
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [diff] [blame] | 15 | |
16 | // The callback will be dispatched on the IO thread. | ||||
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 17 | void RequestQuotaPermission(const content::StorageQuotaParams& params, |
18 | int render_process_id, | ||||
19 | const PermissionCallback& callback) override; | ||||
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [diff] [blame] | 20 | |
21 | void DispatchCallbackOnIOThread( | ||||
[email protected] | c8d98dd | 2011-10-18 23:12:08 | [diff] [blame] | 22 | const PermissionCallback& callback, |
[email protected] | 9f9749a | 2012-03-02 19:37:00 | [diff] [blame] | 23 | QuotaPermissionResponse response); |
[email protected] | 649d1c0 | 2012-04-27 02:56:21 | [diff] [blame] | 24 | |
25 | private: | ||||
Daniel Cheng | a542fca | 2014-10-21 09:51:29 | [diff] [blame] | 26 | ~ChromeQuotaPermissionContext() override; |
[email protected] | 317f96c9 | 2011-05-31 06:53:41 | [diff] [blame] | 27 | }; |
28 | |||||
29 | #endif // CHROME_BROWSER_CHROME_QUOTA_PERMISSION_CONTEXT_H_ |