| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CONTENT_CHILD_QUOTA_DISPATCHER_H_ | 5 #ifndef CONTENT_CHILD_QUOTA_DISPATCHER_H_ |
| 6 #define CONTENT_CHILD_QUOTA_DISPATCHER_H_ | 6 #define CONTENT_CHILD_QUOTA_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void OnMessageReceived(const IPC::Message& msg); | 59 void OnMessageReceived(const IPC::Message& msg); |
| 60 | 60 |
| 61 void QueryStorageUsageAndQuota(const GURL& gurl, | 61 void QueryStorageUsageAndQuota(const GURL& gurl, |
| 62 storage::StorageType type, | 62 storage::StorageType type, |
| 63 Callback* callback); | 63 Callback* callback); |
| 64 void RequestStorageQuota(int render_view_id, | 64 void RequestStorageQuota(int render_view_id, |
| 65 const GURL& gurl, | 65 const GURL& gurl, |
| 66 storage::StorageType type, | 66 storage::StorageType type, |
| 67 uint64 requested_size, | 67 uint64 requested_size, |
| 68 Callback* callback); | 68 Callback* callback); |
| 69 void RequestDurability(int render_view_id, |
| 70 const GURL& gurl, |
| 71 Callback* callback); |
| 69 | 72 |
| 70 // Creates a new Callback instance for WebStorageQuotaCallbacks. | 73 // Creates a new Callback instance for WebStorageQuotaCallbacks. |
| 71 static Callback* CreateWebStorageQuotaCallbacksWrapper( | 74 static Callback* CreateWebStorageQuotaCallbacksWrapper( |
| 72 blink::WebStorageQuotaCallbacks callbacks); | 75 blink::WebStorageQuotaCallbacks callbacks); |
| 73 | 76 |
| 74 private: | 77 private: |
| 75 // Message handlers. | 78 // Message handlers. |
| 76 void DidQueryStorageUsageAndQuota(int request_id, | 79 void DidQueryStorageUsageAndQuota(int request_id, |
| 77 int64 current_usage, | 80 int64 current_usage, |
| 78 int64 current_quota); | 81 int64 current_quota); |
| 79 void DidGrantStorageQuota(int request_id, | 82 void DidGrantStorageQuota(int request_id, |
| 80 int64 current_usage, | 83 int64 current_usage, |
| 81 int64 granted_quota); | 84 int64 granted_quota); |
| 82 void DidFail(int request_id, storage::QuotaStatusCode error); | 85 void DidFail(int request_id, storage::QuotaStatusCode error); |
| 83 | 86 |
| 84 IDMap<Callback, IDMapOwnPointer> pending_quota_callbacks_; | 87 IDMap<Callback, IDMapOwnPointer> pending_quota_callbacks_; |
| 85 | 88 |
| 86 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 89 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
| 87 scoped_refptr<QuotaMessageFilter> quota_message_filter_; | 90 scoped_refptr<QuotaMessageFilter> quota_message_filter_; |
| 88 | 91 |
| 89 DISALLOW_COPY_AND_ASSIGN(QuotaDispatcher); | 92 DISALLOW_COPY_AND_ASSIGN(QuotaDispatcher); |
| 90 }; | 93 }; |
| 91 | 94 |
| 92 } // namespace content | 95 } // namespace content |
| 93 | 96 |
| 94 #endif // CONTENT_CHILD_QUOTA_DISPATCHER_H_ | 97 #endif // CONTENT_CHILD_QUOTA_DISPATCHER_H_ |
| OLD | NEW |