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

Unified Diff: storage/browser/quota/quota_manager.cc

Issue 633273002: Added quota client for serviceworker. Enables 'clear past <time> data'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Logic to Core Created 6 years, 2 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: storage/browser/quota/quota_manager.cc
diff --git a/storage/browser/quota/quota_manager.cc b/storage/browser/quota/quota_manager.cc
index e0f3b14ea2a24484eb3644ee5fc4954dbe08b697..8f7b272f5ff487b7117f8b0215483666e6a8544c 100644
--- a/storage/browser/quota/quota_manager.cc
+++ b/storage/browser/quota/quota_manager.cc
@@ -556,9 +556,11 @@ class QuotaManager::OriginDataDeleter : public QuotaTask {
iter != manager()->clients_.end(); ++iter) {
if (quota_client_mask_ & (*iter)->id()) {
(*iter)->DeleteOriginData(
- origin_, type_,
+ origin_,
+ type_,
base::Bind(&OriginDataDeleter::DidDeleteOriginData,
- weak_factory_.GetWeakPtr()));
+ weak_factory_.GetWeakPtr(),
+ static_cast<int>((*iter)->id())));
jsbell 2014/10/13 20:54:26 Is the logging below the only reason for passing t
dmurph 2014/10/14 00:16:31 Removed, sorry, debugging stuff still around.
} else {
++skipped_clients_;
if (--remaining_clients_ == 0)
@@ -568,6 +570,7 @@ class QuotaManager::OriginDataDeleter : public QuotaTask {
}
virtual void Completed() OVERRIDE {
+ DLOG(ERROR) << "Error count " << error_count_;
jsbell 2014/10/13 20:54:26 remove?
dmurph 2014/10/14 00:16:31 Done.
if (error_count_ == 0) {
// Only remove the entire origin if we didn't skip any client types.
if (skipped_clients_ == 0)
@@ -585,7 +588,8 @@ class QuotaManager::OriginDataDeleter : public QuotaTask {
}
private:
- void DidDeleteOriginData(QuotaStatusCode status) {
+ void DidDeleteOriginData(int id, QuotaStatusCode status) {
+ DLOG(ERROR) << "Got status " << status << " from client " << id;
jsbell 2014/10/13 20:54:26 remove?
dmurph 2014/10/14 00:16:32 Done.
DCHECK_GT(remaining_clients_, 0);
if (status != kQuotaStatusOk)
@@ -642,6 +646,7 @@ class QuotaManager::HostDataDeleter : public QuotaTask {
}
virtual void Completed() OVERRIDE {
+ DLOG(ERROR) << "Error count " << error_count_;
jsbell 2014/10/13 20:54:26 remove?
dmurph 2014/10/14 00:16:32 Done.
if (error_count_ == 0) {
callback_.Run(kQuotaStatusOk);
} else {

Powered by Google App Engine
This is Rietveld 408576698