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

Unified Diff: content/browser/in_process_webkit/indexed_db_quota_client.cc

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC fixes Created 8 years, 8 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/in_process_webkit/indexed_db_quota_client.cc
diff --git a/content/browser/in_process_webkit/indexed_db_quota_client.cc b/content/browser/in_process_webkit/indexed_db_quota_client.cc
index cdda6873b8bee86c5975094c9f0692e5c0c1b9f3..415fd3ca9bf0dd54797e68fb3f7f1d7776877b6d 100644
--- a/content/browser/in_process_webkit/indexed_db_quota_client.cc
+++ b/content/browser/in_process_webkit/indexed_db_quota_client.cc
@@ -32,6 +32,9 @@ class IndexedDBQuotaClient::HelperTask : public quota::QuotaThreadTask {
IndexedDBQuotaClient* client_;
scoped_refptr<IndexedDBContextImpl> indexed_db_context_;
+
+ protected:
+ virtual ~HelperTask() {}
};
class IndexedDBQuotaClient::DeleteOriginTask : public HelperTask {
@@ -43,17 +46,23 @@ class IndexedDBQuotaClient::DeleteOriginTask : public HelperTask {
: HelperTask(client, webkit_thread_message_loop),
origin_url_(origin_url), callback_(callback) {
}
+
private:
+ virtual ~DeleteOriginTask() {}
+
virtual void RunOnTargetThread() OVERRIDE {
indexed_db_context_->DeleteForOrigin(origin_url_);
}
+
virtual void Aborted() OVERRIDE {
callback_.Reset();
}
+
virtual void Completed() OVERRIDE {
callback_.Run(quota::kQuotaStatusOk);
callback_.Reset();
}
+
GURL origin_url_;
DeletionCallback callback_;
};
@@ -69,13 +78,17 @@ class IndexedDBQuotaClient::GetOriginUsageTask : public HelperTask {
}
private:
+ virtual ~GetOriginUsageTask() {}
+
virtual void RunOnTargetThread() OVERRIDE {
usage_ = indexed_db_context_->GetOriginDiskUsage(origin_url_);
}
+
virtual void Completed() OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
client_->DidGetOriginUsage(origin_url_, usage_);
}
+
GURL origin_url_;
int64 usage_;
};
@@ -100,6 +113,9 @@ class IndexedDBQuotaClient::GetOriginsTaskBase : public HelperTask {
}
std::set<GURL> origins_;
+
+ protected:
+ virtual ~GetOriginsTaskBase() {}
};
class IndexedDBQuotaClient::GetAllOriginsTask : public GetOriginsTaskBase {
@@ -113,9 +129,12 @@ class IndexedDBQuotaClient::GetAllOriginsTask : public GetOriginsTaskBase {
}
protected:
+ virtual ~GetAllOriginsTask() {}
+
virtual bool ShouldAddOrigin(const GURL& origin) OVERRIDE {
return true;
}
+
virtual void Completed() OVERRIDE {
client_->DidGetAllOrigins(origins_, type_);
}
@@ -137,12 +156,16 @@ class IndexedDBQuotaClient::GetOriginsForHostTask : public GetOriginsTaskBase {
}
private:
+ virtual ~GetOriginsForHostTask() {}
+
virtual bool ShouldAddOrigin(const GURL& origin) OVERRIDE {
return host_ == net::GetHostOrSpecFromURL(origin);
}
+
virtual void Completed() OVERRIDE {
client_->DidGetOriginsForHost(host_, origins_, type_);
}
+
std::string host_;
quota::StorageType type_;
};

Powered by Google App Engine
This is Rietveld 408576698