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_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "content/browser/browser_message_filter.h" | 10 #include "content/browser/browser_message_filter.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 | 22 |
23 class QuotaPermissionContext; | 23 class QuotaPermissionContext; |
24 | 24 |
25 class QuotaDispatcherHost : public BrowserMessageFilter { | 25 class QuotaDispatcherHost : public BrowserMessageFilter { |
26 public: | 26 public: |
27 QuotaDispatcherHost(int process_id, | 27 QuotaDispatcherHost(int process_id, |
28 quota::QuotaManager* quota_manager, | 28 quota::QuotaManager* quota_manager, |
29 QuotaPermissionContext* permission_context); | 29 QuotaPermissionContext* permission_context); |
30 virtual ~QuotaDispatcherHost(); | 30 virtual ~QuotaDispatcherHost(); |
31 virtual bool OnMessageReceived(const IPC::Message& message, | 31 virtual bool OnMessageReceived(const IPC::Message& message, |
32 bool* message_was_ok); | 32 bool* message_was_ok) OVERRIDE; |
33 | 33 |
34 private: | 34 private: |
35 class RequestDispatcher; | 35 class RequestDispatcher; |
36 class QueryUsageAndQuotaDispatcher; | 36 class QueryUsageAndQuotaDispatcher; |
37 class RequestQuotaDispatcher; | 37 class RequestQuotaDispatcher; |
38 | 38 |
39 void OnQueryStorageUsageAndQuota( | 39 void OnQueryStorageUsageAndQuota( |
40 int request_id, | 40 int request_id, |
41 const GURL& origin_url, | 41 const GURL& origin_url, |
42 quota::StorageType type); | 42 quota::StorageType type); |
43 void OnRequestStorageQuota( | 43 void OnRequestStorageQuota( |
44 int render_view_id, | 44 int render_view_id, |
45 int request_id, | 45 int request_id, |
46 const GURL& origin_url, | 46 const GURL& origin_url, |
47 quota::StorageType type, | 47 quota::StorageType type, |
48 int64 requested_size); | 48 int64 requested_size); |
49 | 49 |
50 // The ID of this process. | 50 // The ID of this process. |
51 int process_id_; | 51 int process_id_; |
52 | 52 |
53 quota::QuotaManager* quota_manager_; | 53 quota::QuotaManager* quota_manager_; |
54 scoped_refptr<QuotaPermissionContext> permission_context_; | 54 scoped_refptr<QuotaPermissionContext> permission_context_; |
55 | 55 |
56 IDMap<RequestDispatcher, IDMapOwnPointer> outstanding_requests_; | 56 IDMap<RequestDispatcher, IDMapOwnPointer> outstanding_requests_; |
57 | 57 |
58 DISALLOW_IMPLICIT_CONSTRUCTORS(QuotaDispatcherHost); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(QuotaDispatcherHost); |
59 }; | 59 }; |
60 | 60 |
61 #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ | 61 #endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_ |
OLD | NEW |