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

Unified Diff: storage/browser/quota/quota_database.h

Issue 442383002: Move storage-related files from webkit/ to new top-level directory storage/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « storage/browser/quota/quota_client.h ('k') | storage/browser/quota/quota_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: storage/browser/quota/quota_database.h
diff --git a/webkit/browser/quota/quota_database.h b/storage/browser/quota/quota_database.h
similarity index 75%
rename from webkit/browser/quota/quota_database.h
rename to storage/browser/quota/quota_database.h
index c64fde72577e0fdaddab2c419fe649ac8335898e..4ff169bc7c1a176fce0dd93092c800a706191ede 100644
--- a/webkit/browser/quota/quota_database.h
+++ b/storage/browser/quota/quota_database.h
@@ -16,8 +16,8 @@
#include "base/time/time.h"
#include "base/timer/timer.h"
#include "url/gurl.h"
-#include "webkit/browser/webkit_storage_browser_export.h"
-#include "webkit/common/quota/quota_types.h"
+#include "storage/common/storage_export.h"
+#include "storage/common/quota/quota_types.h"
namespace content {
class QuotaDatabaseTest;
@@ -35,7 +35,7 @@ namespace quota {
class SpecialStoragePolicy;
// All the methods of this class must run on the DB thread.
-class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaDatabase {
+class STORAGE_EXPORT_PRIVATE QuotaDatabase {
public:
// Constants for {Get,Set}QuotaConfigValue keys.
static const char kDesiredAvailableSpaceKey[];
@@ -62,8 +62,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaDatabase {
// Register initial |origins| info |type| to the database.
// This method is assumed to be called only after the installation or
// the database schema reset.
- bool RegisterInitialOriginInfo(
- const std::set<GURL>& origins, StorageType type);
+ bool RegisterInitialOriginInfo(const std::set<GURL>& origins,
+ StorageType type);
bool DeleteOriginInfo(const GURL& origin, StorageType type);
@@ -92,35 +92,31 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaDatabase {
bool SetOriginDatabaseBootstrapped(bool bootstrap_flag);
private:
- struct WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaTableEntry {
+ struct STORAGE_EXPORT_PRIVATE QuotaTableEntry {
QuotaTableEntry();
- QuotaTableEntry(
- const std::string& host,
- StorageType type,
- int64 quota);
+ QuotaTableEntry(const std::string& host, StorageType type, int64 quota);
std::string host;
StorageType type;
int64 quota;
};
- friend WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE bool operator <(
- const QuotaTableEntry& lhs, const QuotaTableEntry& rhs);
+ friend STORAGE_EXPORT_PRIVATE bool operator<(const QuotaTableEntry& lhs,
+ const QuotaTableEntry& rhs);
- struct WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE OriginInfoTableEntry {
+ struct STORAGE_EXPORT_PRIVATE OriginInfoTableEntry {
OriginInfoTableEntry();
- OriginInfoTableEntry(
- const GURL& origin,
- StorageType type,
- int used_count,
- const base::Time& last_access_time,
- const base::Time& last_modified_time);
+ OriginInfoTableEntry(const GURL& origin,
+ StorageType type,
+ int used_count,
+ const base::Time& last_access_time,
+ const base::Time& last_modified_time);
GURL origin;
StorageType type;
int used_count;
base::Time last_access_time;
base::Time last_modified_time;
};
- friend WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE bool operator <(
- const OriginInfoTableEntry& lhs, const OriginInfoTableEntry& rhs);
+ friend STORAGE_EXPORT_PRIVATE bool operator<(const OriginInfoTableEntry& lhs,
+ const OriginInfoTableEntry& rhs);
// Structures used for CreateSchema.
struct TableSchema {
@@ -134,8 +130,8 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaDatabase {
bool unique;
};
- typedef base::Callback<bool (const QuotaTableEntry&)> QuotaTableCallback;
- typedef base::Callback<bool (const OriginInfoTableEntry&)>
+ typedef base::Callback<bool(const QuotaTableEntry&)> QuotaTableCallback;
+ typedef base::Callback<bool(const OriginInfoTableEntry&)>
OriginInfoTableCallback;
struct QuotaTableImporter;
@@ -156,12 +152,14 @@ class WEBKIT_STORAGE_BROWSER_EXPORT_PRIVATE QuotaDatabase {
bool ResetSchema();
bool UpgradeSchema(int current_version);
- static bool CreateSchema(
- sql::Connection* database,
- sql::MetaTable* meta_table,
- int schema_version, int compatible_version,
- const TableSchema* tables, size_t tables_size,
- const IndexSchema* indexes, size_t indexes_size);
+ static bool CreateSchema(sql::Connection* database,
+ sql::MetaTable* meta_table,
+ int schema_version,
+ int compatible_version,
+ const TableSchema* tables,
+ size_t tables_size,
+ const IndexSchema* indexes,
+ size_t indexes_size);
// |callback| may return false to stop reading data.
bool DumpQuotaTable(const QuotaTableCallback& callback);
« no previous file with comments | « storage/browser/quota/quota_client.h ('k') | storage/browser/quota/quota_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698