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

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

Issue 2930183002: Let IndexedDBContextImpl create its own task runner (Closed)
Patch Set: rebased Created 3 years, 5 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.cc
diff --git a/content/browser/indexed_db/indexed_db_quota_client.cc b/content/browser/indexed_db/indexed_db_quota_client.cc
index c43d6721d766ecea2f7c837fe0530a8486cad732..3d50c3ad0971949be57a9cabe5746c1db43c0408 100644
--- a/content/browser/indexed_db/indexed_db_quota_client.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client.cc
@@ -84,12 +84,6 @@ void IndexedDBQuotaClient::GetOriginUsage(const GURL& origin_url,
return;
}
- // No task runner means unit test; no cleanup necessary.
- if (!indexed_db_context_->TaskRunner()) {
- callback.Run(0);
- return;
- }
-
base::PostTaskAndReplyWithResult(
indexed_db_context_->TaskRunner(), FROM_HERE,
base::Bind(&GetOriginUsageOnIndexedDBThread,
@@ -109,12 +103,6 @@ void IndexedDBQuotaClient::GetOriginsForType(
return;
}
- // No task runner means unit test; no cleanup necessary.
- if (!indexed_db_context_->TaskRunner()) {
- callback.Run(std::set<GURL>());
- return;
- }
-
std::set<GURL>* origins_to_return = new std::set<GURL>();
indexed_db_context_->TaskRunner()->PostTaskAndReply(
FROM_HERE,
@@ -137,12 +125,6 @@ void IndexedDBQuotaClient::GetOriginsForHost(
return;
}
- // No task runner means unit test; no cleanup necessary.
- if (!indexed_db_context_->TaskRunner()) {
- callback.Run(std::set<GURL>());
- return;
- }
-
std::set<GURL>* origins_to_return = new std::set<GURL>();
indexed_db_context_->TaskRunner()->PostTaskAndReply(
FROM_HERE,
@@ -160,12 +142,6 @@ void IndexedDBQuotaClient::DeleteOriginData(const GURL& origin,
return;
}
- // No task runner means unit test; no cleanup necessary.
- if (!indexed_db_context_->TaskRunner()) {
- callback.Run(storage::kQuotaStatusOk);
- return;
- }
-
base::PostTaskAndReplyWithResult(
indexed_db_context_->TaskRunner(), FROM_HERE,
base::Bind(&DeleteOriginDataOnIndexedDBThread,

Powered by Google App Engine
This is Rietveld 408576698