OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "content/browser/renderer_host/quota_dispatcher_host.h" | |
6 | |
7 #include "content/common/quota_messages.h" | |
8 #include "googleurl/src/gurl.h" | |
9 | |
10 QuotaDispatcherHost::~QuotaDispatcherHost() { | |
11 } | |
12 | |
13 bool QuotaDispatcherHost::OnMessageReceived( | |
14 const IPC::Message& message, bool* message_was_ok) { | |
15 *message_was_ok = true; | |
16 bool handled = true; | |
17 IPC_BEGIN_MESSAGE_MAP_EX(QuotaDispatcherHost, message, *message_was_ok) | |
18 IPC_MESSAGE_HANDLER(QuotaHostMsg_QueryStorageUsageAndQuota, | |
19 OnQueryUsageAndQuota) | |
20 IPC_MESSAGE_HANDLER(QuotaHostMsg_RequestStorageQuota, | |
21 OnRequestStorageQuota) | |
22 IPC_MESSAGE_UNHANDLED(handled = false) | |
23 IPC_END_MESSAGE_MAP_EX() | |
24 return handled; | |
25 } | |
26 | |
27 void QuotaDispatcherHost::OnQueryUsageAndQuota( | |
ericu
2011/04/09 02:22:33
OnQueryUsageAndQuota is now the only method withou
kinuko
2011/04/11 06:32:57
Done.
| |
28 int request_id, | |
29 const GURL& gurl, | |
30 WebKit::WebStorageQuotaType type) { | |
31 // TODO(kinuko): not implemented yet. | |
32 Send(new QuotaMsg_DidQueryStorageUsageAndQuota( | |
33 request_id, | |
34 555, 999)); | |
35 } | |
36 | |
37 void QuotaDispatcherHost::OnRequestStorageQuota( | |
38 int request_id, | |
39 const GURL& gurl, | |
40 WebKit::WebStorageQuotaType type, | |
41 int requested_size) { | |
42 // TODO(kinuko): not implemented yet. | |
43 Send(new QuotaMsg_DidFail( | |
44 request_id, | |
45 WebKit::WebStorageQuotaErrorNotSupported)); | |
46 } | |
OLD | NEW |