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

Unified Diff: content/browser/indexed_db/indexed_db_quota_client_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/indexed_db/indexed_db_quota_client_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_quota_client_unittest.cc b/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
index 54ce775d6e2407306112715d300e7ea0a7271461..2ca6cb9d403203a00842d8ec6da1988b8a84b0e7 100644
--- a/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client_unittest.cc
@@ -22,8 +22,8 @@
#include "webkit/common/database/database_identifier.h"
// Declared to shorten the line lengths.
-static const quota::StorageType kTemp = quota::kStorageTypeTemporary;
-static const quota::StorageType kPerm = quota::kStorageTypePersistent;
+static const storage::StorageType kTemp = storage::kStorageTypeTemporary;
+static const storage::StorageType kPerm = storage::kStorageTypePersistent;
namespace content {
@@ -43,13 +43,12 @@ class IndexedDBQuotaClientTest : public testing::Test {
weak_factory_(this) {
browser_context_.reset(new TestBrowserContext());
- scoped_refptr<quota::QuotaManager> quota_manager =
- new MockQuotaManager(
- false /*in_memory*/,
- browser_context_->GetPath(),
- base::MessageLoop::current()->message_loop_proxy(),
- base::MessageLoop::current()->message_loop_proxy(),
- browser_context_->GetSpecialStoragePolicy());
+ scoped_refptr<storage::QuotaManager> quota_manager =
+ new MockQuotaManager(false /*in_memory*/,
+ browser_context_->GetPath(),
+ base::MessageLoop::current()->message_loop_proxy(),
+ base::MessageLoop::current()->message_loop_proxy(),
+ browser_context_->GetSpecialStoragePolicy());
idb_context_ =
new IndexedDBContextImpl(browser_context_->GetPath(),
@@ -77,9 +76,9 @@ class IndexedDBQuotaClientTest : public testing::Test {
base::MessageLoop::current()->RunUntilIdle();
}
- int64 GetOriginUsage(quota::QuotaClient* client,
+ int64 GetOriginUsage(storage::QuotaClient* client,
const GURL& origin,
- quota::StorageType type) {
+ storage::StorageType type) {
usage_ = -1;
client->GetOriginUsage(
origin,
@@ -92,8 +91,8 @@ class IndexedDBQuotaClientTest : public testing::Test {
return usage_;
}
- const std::set<GURL>& GetOriginsForType(quota::QuotaClient* client,
- quota::StorageType type) {
+ const std::set<GURL>& GetOriginsForType(storage::QuotaClient* client,
+ storage::StorageType type) {
origins_.clear();
client->GetOriginsForType(
type,
@@ -104,8 +103,8 @@ class IndexedDBQuotaClientTest : public testing::Test {
return origins_;
}
- const std::set<GURL>& GetOriginsForHost(quota::QuotaClient* client,
- quota::StorageType type,
+ const std::set<GURL>& GetOriginsForHost(storage::QuotaClient* client,
+ storage::StorageType type,
const std::string& host) {
origins_.clear();
client->GetOriginsForHost(
@@ -118,9 +117,9 @@ class IndexedDBQuotaClientTest : public testing::Test {
return origins_;
}
- quota::QuotaStatusCode DeleteOrigin(quota::QuotaClient* client,
- const GURL& origin_url) {
- delete_status_ = quota::kQuotaStatusUnknown;
+ storage::QuotaStatusCode DeleteOrigin(storage::QuotaClient* client,
+ const GURL& origin_url) {
+ delete_status_ = storage::kQuotaStatusUnknown;
client->DeleteOriginData(
origin_url,
kTemp,
@@ -140,7 +139,7 @@ class IndexedDBQuotaClientTest : public testing::Test {
void AddFakeIndexedDB(const GURL& origin, int size) {
base::FilePath file_path_origin = idb_context()->GetFilePathForTesting(
- webkit_database::GetIdentifierFromOrigin(origin));
+ storage::GetIdentifierFromOrigin(origin));
if (!base::CreateDirectory(file_path_origin)) {
LOG(ERROR) << "failed to base::CreateDirectory "
<< file_path_origin.value();
@@ -157,7 +156,7 @@ class IndexedDBQuotaClientTest : public testing::Test {
origins_ = origins;
}
- void OnDeleteOriginComplete(quota::QuotaStatusCode code) {
+ void OnDeleteOriginComplete(storage::QuotaStatusCode code) {
delete_status_ = code;
}
@@ -168,7 +167,7 @@ class IndexedDBQuotaClientTest : public testing::Test {
scoped_refptr<IndexedDBContextImpl> idb_context_;
content::TestBrowserThreadBundle thread_bundle_;
scoped_ptr<TestBrowserContext> browser_context_;
- quota::QuotaStatusCode delete_status_;
+ storage::QuotaStatusCode delete_status_;
base::WeakPtrFactory<IndexedDBQuotaClientTest> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(IndexedDBQuotaClientTest);
@@ -237,8 +236,8 @@ TEST_F(IndexedDBQuotaClientTest, DeleteOrigin) {
EXPECT_EQ(1000, GetOriginUsage(&client, kOriginA, kTemp));
EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
- quota::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
- EXPECT_EQ(quota::kQuotaStatusOk, delete_status);
+ storage::QuotaStatusCode delete_status = DeleteOrigin(&client, kOriginA);
+ EXPECT_EQ(storage::kQuotaStatusOk, delete_status);
EXPECT_EQ(0, GetOriginUsage(&client, kOriginA, kTemp));
EXPECT_EQ(50, GetOriginUsage(&client, kOriginB, kTemp));
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_quota_client.cc ('k') | content/browser/indexed_db/indexed_db_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698