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

Unified Diff: chrome/browser/browsing_data/browsing_data_quota_helper_impl.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: chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
diff --git a/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc b/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
index ec870d7eafc31f0de54f904d033a6d9207b2d18f..1c6d01b12c327c44d1ec8027c41da910cb3a14c9 100644
--- a/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
+++ b/chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc
@@ -57,7 +57,7 @@ void BrowsingDataQuotaHelperImpl::RevokeHostQuota(const std::string& host) {
BrowsingDataQuotaHelperImpl::BrowsingDataQuotaHelperImpl(
base::MessageLoopProxy* ui_thread,
base::MessageLoopProxy* io_thread,
- quota::QuotaManager* quota_manager)
+ storage::QuotaManager* quota_manager)
: BrowsingDataQuotaHelper(io_thread),
quota_manager_(quota_manager),
is_fetching_(false),
@@ -78,39 +78,39 @@ void BrowsingDataQuotaHelperImpl::FetchQuotaInfo() {
}
quota_manager_->GetOriginsModifiedSince(
- quota::kStorageTypeTemporary,
+ storage::kStorageTypeTemporary,
base::Time(),
base::Bind(&BrowsingDataQuotaHelperImpl::GotOrigins,
weak_factory_.GetWeakPtr()));
}
-void BrowsingDataQuotaHelperImpl::GotOrigins(
- const std::set<GURL>& origins, quota::StorageType type) {
+void BrowsingDataQuotaHelperImpl::GotOrigins(const std::set<GURL>& origins,
+ storage::StorageType type) {
for (std::set<GURL>::const_iterator itr = origins.begin();
itr != origins.end();
++itr)
if (BrowsingDataHelper::HasWebScheme(*itr))
pending_hosts_.insert(std::make_pair(itr->host(), type));
- DCHECK(type == quota::kStorageTypeTemporary ||
- type == quota::kStorageTypePersistent ||
- type == quota::kStorageTypeSyncable);
+ DCHECK(type == storage::kStorageTypeTemporary ||
+ type == storage::kStorageTypePersistent ||
+ type == storage::kStorageTypeSyncable);
// Calling GetOriginsModifiedSince() for all types by chaining callbacks.
- if (type == quota::kStorageTypeTemporary) {
+ if (type == storage::kStorageTypeTemporary) {
quota_manager_->GetOriginsModifiedSince(
- quota::kStorageTypePersistent,
+ storage::kStorageTypePersistent,
base::Time(),
base::Bind(&BrowsingDataQuotaHelperImpl::GotOrigins,
weak_factory_.GetWeakPtr()));
- } else if (type == quota::kStorageTypePersistent) {
+ } else if (type == storage::kStorageTypePersistent) {
quota_manager_->GetOriginsModifiedSince(
- quota::kStorageTypeSyncable,
+ storage::kStorageTypeSyncable,
base::Time(),
base::Bind(&BrowsingDataQuotaHelperImpl::GotOrigins,
weak_factory_.GetWeakPtr()));
} else {
- DCHECK(type == quota::kStorageTypeSyncable);
+ DCHECK(type == storage::kStorageTypeSyncable);
ProcessPendingHosts();
}
}
@@ -123,13 +123,13 @@ void BrowsingDataQuotaHelperImpl::ProcessPendingHosts() {
PendingHosts::iterator itr = pending_hosts_.begin();
std::string host = itr->first;
- quota::StorageType type = itr->second;
+ storage::StorageType type = itr->second;
pending_hosts_.erase(itr);
GetHostUsage(host, type);
}
void BrowsingDataQuotaHelperImpl::GetHostUsage(const std::string& host,
- quota::StorageType type) {
+ storage::StorageType type) {
DCHECK(quota_manager_.get());
quota_manager_->GetHostUsage(
host, type,
@@ -138,16 +138,16 @@ void BrowsingDataQuotaHelperImpl::GetHostUsage(const std::string& host,
}
void BrowsingDataQuotaHelperImpl::GotHostUsage(const std::string& host,
- quota::StorageType type,
+ storage::StorageType type,
int64 usage) {
switch (type) {
- case quota::kStorageTypeTemporary:
+ case storage::kStorageTypeTemporary:
quota_info_[host].temporary_usage = usage;
break;
- case quota::kStorageTypePersistent:
+ case storage::kStorageTypePersistent:
quota_info_[host].persistent_usage = usage;
break;
- case quota::kStorageTypeSyncable:
+ case storage::kStorageTypeSyncable:
quota_info_[host].syncable_usage = usage;
break;
default:
@@ -187,6 +187,6 @@ void BrowsingDataQuotaHelperImpl::OnComplete() {
}
void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota(
- quota::QuotaStatusCode status_unused,
+ storage::QuotaStatusCode status_unused,
int64 quota_unused) {
}

Powered by Google App Engine
This is Rietveld 408576698