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

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

Issue 1815363002: Add RetainedRef uses where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 17964313b1156531426c7a43f2e5aaac9b09c898..8fc9ce8cd96fb27a74d93f12eca54bbc82c0a4a1 100644
--- a/content/browser/indexed_db/indexed_db_quota_client.cc
+++ b/content/browser/indexed_db/indexed_db_quota_client.cc
@@ -90,10 +90,9 @@ void IndexedDBQuotaClient::GetOriginUsage(const GURL& origin_url,
}
base::PostTaskAndReplyWithResult(
- indexed_db_context_->TaskRunner(),
- FROM_HERE,
- base::Bind(
- &GetOriginUsageOnIndexedDBThread, indexed_db_context_, origin_url),
+ indexed_db_context_->TaskRunner(), FROM_HERE,
+ base::Bind(&GetOriginUsageOnIndexedDBThread,
+ base::RetainedRef(indexed_db_context_), origin_url),
callback);
}
@@ -117,10 +116,9 @@ void IndexedDBQuotaClient::GetOriginsForType(
std::set<GURL>* origins_to_return = new std::set<GURL>();
indexed_db_context_->TaskRunner()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&GetAllOriginsOnIndexedDBThread,
- indexed_db_context_,
- base::Unretained(origins_to_return)),
+ FROM_HERE, base::Bind(&GetAllOriginsOnIndexedDBThread,
+ base::RetainedRef(indexed_db_context_),
+ base::Unretained(origins_to_return)),
base::Bind(&DidGetOrigins, callback, base::Owned(origins_to_return)));
}
@@ -145,11 +143,9 @@ void IndexedDBQuotaClient::GetOriginsForHost(
std::set<GURL>* origins_to_return = new std::set<GURL>();
indexed_db_context_->TaskRunner()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&GetOriginsForHostOnIndexedDBThread,
- indexed_db_context_,
- host,
- base::Unretained(origins_to_return)),
+ FROM_HERE, base::Bind(&GetOriginsForHostOnIndexedDBThread,
+ base::RetainedRef(indexed_db_context_), host,
+ base::Unretained(origins_to_return)),
base::Bind(&DidGetOrigins, callback, base::Owned(origins_to_return)));
}
@@ -168,10 +164,9 @@ void IndexedDBQuotaClient::DeleteOriginData(const GURL& origin,
}
base::PostTaskAndReplyWithResult(
- indexed_db_context_->TaskRunner(),
- FROM_HERE,
- base::Bind(
- &DeleteOriginDataOnIndexedDBThread, indexed_db_context_, origin),
+ indexed_db_context_->TaskRunner(), FROM_HERE,
+ base::Bind(&DeleteOriginDataOnIndexedDBThread,
+ base::RetainedRef(indexed_db_context_), origin),
callback);
}
« no previous file with comments | « content/browser/download/save_package.cc ('k') | content/browser/loader/async_revalidation_driver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698