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

Unified Diff: storage/browser/fileapi/file_system_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: storage/browser/fileapi/file_system_quota_client.cc
diff --git a/storage/browser/fileapi/file_system_quota_client.cc b/storage/browser/fileapi/file_system_quota_client.cc
index f6cab0d96809d74b01638c95251f120fbf1381b0..58a219ddbd98905e6b73a5e4f8479125faf27071 100644
--- a/storage/browser/fileapi/file_system_quota_client.cc
+++ b/storage/browser/fileapi/file_system_quota_client.cc
@@ -114,14 +114,11 @@ void FileSystemQuotaClient::GetOriginUsage(
}
base::PostTaskAndReplyWithResult(
- file_task_runner(),
- FROM_HERE,
+ file_task_runner(), FROM_HERE,
// It is safe to pass Unretained(quota_util) since context owns it.
base::Bind(&FileSystemQuotaUtil::GetOriginUsageOnFileTaskRunner,
base::Unretained(quota_util),
- file_system_context_,
- origin_url,
- type),
+ base::RetainedRef(file_system_context_), origin_url, type),
callback);
}
@@ -139,14 +136,10 @@ void FileSystemQuotaClient::GetOriginsForType(
std::set<GURL>* origins_ptr = new std::set<GURL>();
file_task_runner()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&GetOriginsForTypeOnFileTaskRunner,
- file_system_context_,
- storage_type,
- base::Unretained(origins_ptr)),
- base::Bind(&DidGetOrigins,
- callback,
- base::Owned(origins_ptr)));
+ FROM_HERE, base::Bind(&GetOriginsForTypeOnFileTaskRunner,
+ base::RetainedRef(file_system_context_),
+ storage_type, base::Unretained(origins_ptr)),
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr)));
}
void FileSystemQuotaClient::GetOriginsForHost(
@@ -164,15 +157,10 @@ void FileSystemQuotaClient::GetOriginsForHost(
std::set<GURL>* origins_ptr = new std::set<GURL>();
file_task_runner()->PostTaskAndReply(
- FROM_HERE,
- base::Bind(&GetOriginsForHostOnFileTaskRunner,
- file_system_context_,
- storage_type,
- host,
- base::Unretained(origins_ptr)),
- base::Bind(&DidGetOrigins,
- callback,
- base::Owned(origins_ptr)));
+ FROM_HERE, base::Bind(&GetOriginsForHostOnFileTaskRunner,
+ base::RetainedRef(file_system_context_),
+ storage_type, host, base::Unretained(origins_ptr)),
+ base::Bind(&DidGetOrigins, callback, base::Owned(origins_ptr)));
}
void FileSystemQuotaClient::DeleteOriginData(
@@ -183,12 +171,9 @@ void FileSystemQuotaClient::DeleteOriginData(
DCHECK(fs_type != kFileSystemTypeUnknown);
base::PostTaskAndReplyWithResult(
- file_task_runner(),
- FROM_HERE,
+ file_task_runner(), FROM_HERE,
base::Bind(&DeleteOriginOnFileTaskRunner,
- file_system_context_,
- origin,
- fs_type),
+ base::RetainedRef(file_system_context_), origin, fs_type),
callback);
}
« no previous file with comments | « storage/browser/fileapi/file_system_file_stream_reader.cc ('k') | storage/browser/fileapi/local_file_stream_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698