Index: content/browser/indexed_db/indexed_db_context_impl.cc |
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc |
index f61a8880515c12ec65469dc9fc13e336ada400a4..173cacefd144adc387865d719785b983b688f90b 100644 |
--- a/content/browser/indexed_db/indexed_db_context_impl.cc |
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc |
@@ -38,7 +38,7 @@ |
using base::DictionaryValue; |
using base::ListValue; |
-using webkit_database::DatabaseUtil; |
+using storage::DatabaseUtil; |
namespace content { |
const base::FilePath::CharType IndexedDBContextImpl::kIndexedDBDirectory[] = |
@@ -68,7 +68,7 @@ void GetAllOriginsAndPaths(const base::FilePath& indexeddb_path, |
file_path.RemoveExtension().Extension() == kIndexedDBExtension) { |
std::string origin_id = file_path.BaseName().RemoveExtension() |
.RemoveExtension().MaybeAsASCII(); |
- origins->push_back(webkit_database::GetOriginFromIdentifier(origin_id)); |
+ origins->push_back(storage::GetOriginFromIdentifier(origin_id)); |
if (file_paths) |
file_paths->push_back(file_path); |
} |
@@ -78,7 +78,7 @@ void GetAllOriginsAndPaths(const base::FilePath& indexeddb_path, |
// This will be called after the IndexedDBContext is destroyed. |
void ClearSessionOnlyOrigins( |
const base::FilePath& indexeddb_path, |
- scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy) { |
+ scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy) { |
// TODO(jsbell): DCHECK that this is running on an IndexedDB thread, |
// if a global handle to it is ever available. |
std::vector<GURL> origins; |
@@ -102,8 +102,8 @@ void ClearSessionOnlyOrigins( |
IndexedDBContextImpl::IndexedDBContextImpl( |
const base::FilePath& data_path, |
- quota::SpecialStoragePolicy* special_storage_policy, |
- quota::QuotaManagerProxy* quota_manager_proxy, |
+ storage::SpecialStoragePolicy* special_storage_policy, |
+ storage::QuotaManagerProxy* quota_manager_proxy, |
base::SequencedTaskRunner* task_runner) |
: force_keep_session_state_(false), |
special_storage_policy_(special_storage_policy), |
@@ -363,7 +363,7 @@ size_t IndexedDBContextImpl::GetConnectionCount(const GURL& origin_url) { |
} |
base::FilePath IndexedDBContextImpl::GetFilePath(const GURL& origin_url) const { |
- std::string origin_id = webkit_database::GetIdentifierFromOrigin(origin_url); |
+ std::string origin_id = storage::GetIdentifierFromOrigin(origin_url); |
return GetIndexedDBFilePath(origin_id); |
} |
@@ -383,9 +383,9 @@ void IndexedDBContextImpl::ConnectionOpened(const GURL& origin_url, |
DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
if (quota_manager_proxy()) { |
quota_manager_proxy()->NotifyStorageAccessed( |
- quota::QuotaClient::kIndexedDatabase, |
+ storage::QuotaClient::kIndexedDatabase, |
origin_url, |
- quota::kStorageTypeTemporary); |
+ storage::kStorageTypeTemporary); |
} |
if (AddToOriginSet(origin_url)) { |
// A newly created db, notify the quota system. |
@@ -401,9 +401,9 @@ void IndexedDBContextImpl::ConnectionClosed(const GURL& origin_url, |
DCHECK(TaskRunner()->RunsTasksOnCurrentThread()); |
if (quota_manager_proxy()) { |
quota_manager_proxy()->NotifyStorageAccessed( |
- quota::QuotaClient::kIndexedDatabase, |
+ storage::QuotaClient::kIndexedDatabase, |
origin_url, |
- quota::kStorageTypeTemporary); |
+ storage::kStorageTypeTemporary); |
} |
if (factory_ && factory_->GetConnectionCount(origin_url) == 0) |
QueryDiskAndUpdateQuotaUsage(origin_url); |
@@ -436,7 +436,7 @@ bool IndexedDBContextImpl::IsOverQuota(const GURL& origin_url) { |
return WouldBeOverQuota(origin_url, kOneAdditionalByte); |
} |
-quota::QuotaManagerProxy* IndexedDBContextImpl::quota_manager_proxy() { |
+storage::QuotaManagerProxy* IndexedDBContextImpl::quota_manager_proxy() { |
return quota_manager_proxy_; |
} |
@@ -497,22 +497,23 @@ void IndexedDBContextImpl::QueryDiskAndUpdateQuotaUsage( |
// quota_manager_proxy() is NULL in unit tests. |
if (quota_manager_proxy()) { |
quota_manager_proxy()->NotifyStorageModified( |
- quota::QuotaClient::kIndexedDatabase, |
+ storage::QuotaClient::kIndexedDatabase, |
origin_url, |
- quota::kStorageTypeTemporary, |
+ storage::kStorageTypeTemporary, |
difference); |
} |
} |
} |
void IndexedDBContextImpl::GotUsageAndQuota(const GURL& origin_url, |
- quota::QuotaStatusCode status, |
+ storage::QuotaStatusCode status, |
int64 usage, |
int64 quota) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
- DCHECK(status == quota::kQuotaStatusOk || status == quota::kQuotaErrorAbort) |
+ DCHECK(status == storage::kQuotaStatusOk || |
+ status == storage::kQuotaErrorAbort) |
<< "status was " << status; |
- if (status == quota::kQuotaErrorAbort) { |
+ if (status == storage::kQuotaErrorAbort) { |
// We seem to no longer care to wait around for the answer. |
return; |
} |
@@ -548,7 +549,7 @@ void IndexedDBContextImpl::QueryAvailableQuota(const GURL& origin_url) { |
return; |
quota_manager_proxy()->quota_manager()->GetUsageAndQuota( |
origin_url, |
- quota::kStorageTypeTemporary, |
+ storage::kStorageTypeTemporary, |
base::Bind(&IndexedDBContextImpl::GotUsageAndQuota, this, origin_url)); |
} |