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

Unified Diff: content/common/quota_dispatcher.h

Issue 16328003: Move a bunch of child-only code from content/common to content/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/common/quota_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/quota_dispatcher.h
diff --git a/content/common/quota_dispatcher.h b/content/common/quota_dispatcher.h
deleted file mode 100644
index 391ab4f7721d17337f6450c621a7c389fd638f0e..0000000000000000000000000000000000000000
--- a/content/common/quota_dispatcher.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// 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.
-
-#ifndef CONTENT_COMMON_QUOTA_DISPATCHER_H_
-#define CONTENT_COMMON_QUOTA_DISPATCHER_H_
-
-#include <map>
-#include <set>
-
-#include "base/basictypes.h"
-#include "base/id_map.h"
-#include "ipc/ipc_listener.h"
-#include "webkit/common/quota/quota_types.h"
-
-class GURL;
-
-namespace IPC {
-class Message;
-}
-
-namespace WebKit {
-class WebStorageQuotaCallbacks;
-}
-
-namespace content {
-
-// Dispatches and sends quota related messages sent to/from a child
-// process from/to the main browser process. There is one instance
-// per child process. Messages are dispatched on the main child thread.
-class QuotaDispatcher : public IPC::Listener {
- public:
- class Callback {
- public:
- virtual ~Callback() {}
- virtual void DidQueryStorageUsageAndQuota(int64 usage, int64 quota) = 0;
- virtual void DidGrantStorageQuota(int64 granted_quota) = 0;
- virtual void DidFail(quota::QuotaStatusCode status) = 0;
- };
-
- QuotaDispatcher();
- virtual ~QuotaDispatcher();
-
- // IPC::Listener implementation.
- virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
-
- void QueryStorageUsageAndQuota(const GURL& gurl,
- quota::StorageType type,
- Callback* callback);
- void RequestStorageQuota(int render_view_id,
- const GURL& gurl,
- quota::StorageType type,
- int64 requested_size,
- Callback* callback);
-
- // Creates a new Callback instance for WebStorageQuotaCallbacks.
- static Callback* CreateWebStorageQuotaCallbacksWrapper(
- WebKit::WebStorageQuotaCallbacks* callbacks);
-
- private:
- // Message handlers.
- void DidQueryStorageUsageAndQuota(int request_id,
- int64 current_usage,
- int64 current_quota);
- void DidGrantStorageQuota(int request_id,
- int64 granted_quota);
- void DidFail(int request_id, quota::QuotaStatusCode error);
-
- IDMap<Callback, IDMapOwnPointer> pending_quota_callbacks_;
-
- DISALLOW_COPY_AND_ASSIGN(QuotaDispatcher);
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_QUOTA_DISPATCHER_H_
« no previous file with comments | « content/common/gpu/media/vaapi_video_decode_accelerator.cc ('k') | content/common/quota_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698