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

Unified Diff: content/browser/quota/quota_backend_impl_unittest.cc

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build 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
Index: content/browser/quota/quota_backend_impl_unittest.cc
diff --git a/content/browser/quota/quota_backend_impl_unittest.cc b/content/browser/quota/quota_backend_impl_unittest.cc
index 201fab093759d2d122d2e22001f92195f268260f..ba828bb311f8d1e2181933d9d629343e4479f50b 100644
--- a/content/browser/quota/quota_backend_impl_unittest.cc
+++ b/content/browser/quota/quota_backend_impl_unittest.cc
@@ -15,10 +15,10 @@
#include "webkit/browser/fileapi/obfuscated_file_util.h"
#include "webkit/browser/quota/quota_manager_proxy.h"
-using fileapi::FileSystemUsageCache;
-using fileapi::ObfuscatedFileUtil;
-using fileapi::QuotaBackendImpl;
-using fileapi::SandboxFileSystemBackendDelegate;
+using storage::FileSystemUsageCache;
+using storage::ObfuscatedFileUtil;
+using storage::QuotaBackendImpl;
+using storage::SandboxFileSystemBackendDelegate;
namespace content {
@@ -38,7 +38,7 @@ bool DidReserveQuota(bool accepted,
return accepted;
}
-class MockQuotaManagerProxy : public quota::QuotaManagerProxy {
+class MockQuotaManagerProxy : public storage::QuotaManagerProxy {
public:
MockQuotaManagerProxy()
: QuotaManagerProxy(NULL, NULL),
@@ -48,16 +48,15 @@ class MockQuotaManagerProxy : public quota::QuotaManagerProxy {
// We don't mock them.
virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {}
virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {}
- virtual void SetUsageCacheEnabled(quota::QuotaClient::ID client_id,
+ virtual void SetUsageCacheEnabled(storage::QuotaClient::ID client_id,
const GURL& origin,
- quota::StorageType type,
+ storage::StorageType type,
bool enabled) OVERRIDE {}
- virtual void NotifyStorageModified(
- quota::QuotaClient::ID client_id,
- const GURL& origin,
- quota::StorageType type,
- int64 delta) OVERRIDE {
+ virtual void NotifyStorageModified(storage::QuotaClient::ID client_id,
+ const GURL& origin,
+ storage::StorageType type,
+ int64 delta) OVERRIDE {
++storage_modified_count_;
usage_ += delta;
ASSERT_LE(usage_, quota_);
@@ -66,9 +65,9 @@ class MockQuotaManagerProxy : public quota::QuotaManagerProxy {
virtual void GetUsageAndQuota(
base::SequencedTaskRunner* original_task_runner,
const GURL& origin,
- quota::StorageType type,
+ storage::StorageType type,
const GetUsageAndQuotaCallback& callback) OVERRIDE {
- callback.Run(quota::kQuotaStatusOk, usage_, quota_);
+ callback.Run(storage::kQuotaStatusOk, usage_, quota_);
}
int storage_modified_count() { return storage_modified_count_; }
@@ -115,7 +114,7 @@ class QuotaBackendImplTest : public testing::Test {
protected:
void InitializeForOriginAndType(const GURL& origin,
- fileapi::FileSystemType type) {
+ storage::FileSystemType type) {
ASSERT_TRUE(file_util_->InitOriginDatabase(origin, true /* create */));
ASSERT_TRUE(file_util_->origin_database_ != NULL);
@@ -135,7 +134,7 @@ class QuotaBackendImplTest : public testing::Test {
}
base::FilePath GetUsageCachePath(const GURL& origin,
- fileapi::FileSystemType type) {
+ storage::FileSystemType type) {
base::FilePath path;
base::File::Error error =
backend_->GetUsageCachePath(origin, type, &path);
@@ -157,7 +156,7 @@ class QuotaBackendImplTest : public testing::Test {
};
TEST_F(QuotaBackendImplTest, ReserveQuota_Basic) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(10000);
@@ -183,7 +182,7 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Basic) {
}
TEST_F(QuotaBackendImplTest, ReserveQuota_NoSpace) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(100);
@@ -201,7 +200,7 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_NoSpace) {
}
TEST_F(QuotaBackendImplTest, ReserveQuota_Revert) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(10000);
@@ -219,7 +218,7 @@ TEST_F(QuotaBackendImplTest, ReserveQuota_Revert) {
}
TEST_F(QuotaBackendImplTest, ReleaseReservedQuota) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
const int64 kInitialUsage = 2000;
quota_manager_proxy_->set_usage(kInitialUsage);
@@ -233,7 +232,7 @@ TEST_F(QuotaBackendImplTest, ReleaseReservedQuota) {
}
TEST_F(QuotaBackendImplTest, CommitQuotaUsage) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
quota_manager_proxy_->set_quota(10000);
base::FilePath path = GetUsageCachePath(GURL(kOrigin), type);
@@ -256,7 +255,7 @@ TEST_F(QuotaBackendImplTest, CommitQuotaUsage) {
}
TEST_F(QuotaBackendImplTest, DirtyCount) {
- fileapi::FileSystemType type = fileapi::kFileSystemTypeTemporary;
+ storage::FileSystemType type = storage::kFileSystemTypeTemporary;
InitializeForOriginAndType(GURL(kOrigin), type);
base::FilePath path = GetUsageCachePath(GURL(kOrigin), type);
« no previous file with comments | « content/browser/quota/mock_quota_manager_unittest.cc ('k') | content/browser/quota/quota_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698