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

Unified Diff: webkit/browser/quota/quota_client.h

Issue 539143002: Migrate webkit/browser/ to storage/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android build Created 6 years, 3 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 | « webkit/browser/quota/quota_callbacks.h ('k') | webkit/browser/quota/quota_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/browser/quota/quota_client.h
diff --git a/webkit/browser/quota/quota_client.h b/webkit/browser/quota/quota_client.h
index 5f94dd014b29a8c21d439709180f6bd713fef3ca..435cf0f56cf994a10e80926fcff7468ae2fc1fdc 100644
--- a/webkit/browser/quota/quota_client.h
+++ b/webkit/browser/quota/quota_client.h
@@ -1,81 +1,5 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
+// Copyright 2014 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 WEBKIT_BROWSER_QUOTA_QUOTA_CLIENT_H_
-#define WEBKIT_BROWSER_QUOTA_QUOTA_CLIENT_H_
-
-#include <list>
-#include <set>
-#include <string>
-
-#include "base/callback.h"
-#include "url/gurl.h"
-#include "webkit/browser/storage_browser_export.h"
-#include "webkit/common/quota/quota_types.h"
-
-namespace storage {
-
-// An abstract interface for quota manager clients.
-// Each storage API must provide an implementation of this interface and
-// register it to the quota manager.
-// All the methods are assumed to be called on the IO thread in the browser.
-class STORAGE_EXPORT QuotaClient {
- public:
- typedef base::Callback<void(int64 usage)> GetUsageCallback;
- typedef base::Callback<void(const std::set<GURL>& origins)>
- GetOriginsCallback;
- typedef base::Callback<void(QuotaStatusCode status)> DeletionCallback;
-
- virtual ~QuotaClient() {}
-
- enum ID {
- kUnknown = 1 << 0,
- kFileSystem = 1 << 1,
- kDatabase = 1 << 2,
- kAppcache = 1 << 3,
- kIndexedDatabase = 1 << 4,
- kAllClientsMask = -1,
- };
-
- virtual ID id() const = 0;
-
- // Called when the quota manager is destroyed.
- virtual void OnQuotaManagerDestroyed() = 0;
-
- // Called by the QuotaManager.
- // Gets the amount of data stored in the storage specified by
- // |origin_url| and |type|.
- // Note it is safe to fire the callback after the QuotaClient is destructed.
- virtual void GetOriginUsage(const GURL& origin_url,
- StorageType type,
- const GetUsageCallback& callback) = 0;
-
- // Called by the QuotaManager.
- // Returns a list of origins that has data in the |type| storage.
- // Note it is safe to fire the callback after the QuotaClient is destructed.
- virtual void GetOriginsForType(StorageType type,
- const GetOriginsCallback& callback) = 0;
-
- // Called by the QuotaManager.
- // Returns a list of origins that match the |host|.
- // Note it is safe to fire the callback after the QuotaClient is destructed.
- virtual void GetOriginsForHost(StorageType type,
- const std::string& host,
- const GetOriginsCallback& callback) = 0;
-
- // Called by the QuotaManager.
- // Note it is safe to fire the callback after the QuotaClient is destructed.
- virtual void DeleteOriginData(const GURL& origin,
- StorageType type,
- const DeletionCallback& callback) = 0;
-
- virtual bool DoesSupport(StorageType type) const = 0;
-};
-
-// TODO(dmikurube): Replace it to std::vector for efficiency.
-typedef std::list<QuotaClient*> QuotaClientList;
-
-} // namespace storage
-
-#endif // WEBKIT_BROWSER_QUOTA_QUOTA_CLIENT_H_
+#include "storage/browser/quota/quota_client.h"
« no previous file with comments | « webkit/browser/quota/quota_callbacks.h ('k') | webkit/browser/quota/quota_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698