Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(727)

Unified Diff: content/browser/renderer_host/quota_dispatcher_host.cc

Issue 6811022: Add IPC plumbing code for Quota API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/quota_dispatcher_host.h ('k') | content/common/child_thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/quota_dispatcher_host.cc
diff --git a/content/browser/renderer_host/quota_dispatcher_host.cc b/content/browser/renderer_host/quota_dispatcher_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..c9d05e8dd1bb9ba9ac6160c329ff14b14e33b67c
--- /dev/null
+++ b/content/browser/renderer_host/quota_dispatcher_host.cc
@@ -0,0 +1,46 @@
+// Copyright (c) 2011 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.
+
+#include "content/browser/renderer_host/quota_dispatcher_host.h"
+
+#include "content/common/quota_messages.h"
+#include "googleurl/src/gurl.h"
+
+QuotaDispatcherHost::~QuotaDispatcherHost() {
+}
+
+bool QuotaDispatcherHost::OnMessageReceived(
+ const IPC::Message& message, bool* message_was_ok) {
+ *message_was_ok = true;
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP_EX(QuotaDispatcherHost, message, *message_was_ok)
+ IPC_MESSAGE_HANDLER(QuotaHostMsg_QueryStorageUsageAndQuota,
+ OnQueryUsageAndQuota)
+ IPC_MESSAGE_HANDLER(QuotaHostMsg_RequestStorageQuota,
+ OnRequestStorageQuota)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP_EX()
+ return handled;
+}
+
+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.
+ int request_id,
+ const GURL& gurl,
+ WebKit::WebStorageQuotaType type) {
+ // TODO(kinuko): not implemented yet.
+ Send(new QuotaMsg_DidQueryStorageUsageAndQuota(
+ request_id,
+ 555, 999));
+}
+
+void QuotaDispatcherHost::OnRequestStorageQuota(
+ int request_id,
+ const GURL& gurl,
+ WebKit::WebStorageQuotaType type,
+ int requested_size) {
+ // TODO(kinuko): not implemented yet.
+ Send(new QuotaMsg_DidFail(
+ request_id,
+ WebKit::WebStorageQuotaErrorNotSupported));
+}
« no previous file with comments | « content/browser/renderer_host/quota_dispatcher_host.h ('k') | content/common/child_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698