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

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

Issue 2941353002: Indexed DB: Use BindOnce / OnceCallback / OnceClosure where applicable (Closed)
Patch Set: Created 3 years, 6 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_internals_ui.cc
diff --git a/content/browser/indexed_db/indexed_db_internals_ui.cc b/content/browser/indexed_db/indexed_db_internals_ui.cc
index 63c13349b0f9f486334aa2b40b9030b2fccf4134..6ab72607b17fdb0c3e7ab0537ecc15ed846aad47 100644
--- a/content/browser/indexed_db/indexed_db_internals_ui.cc
+++ b/content/browser/indexed_db/indexed_db_internals_ui.cc
@@ -83,10 +83,8 @@ void IndexedDBInternalsUI::AddContextFromStoragePartition(
scoped_refptr<IndexedDBContext> context = partition->GetIndexedDBContext();
context->TaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::GetAllOriginsOnIndexedDBThread,
- base::Unretained(this),
- context,
- partition->GetPath()));
+ base::BindOnce(&IndexedDBInternalsUI::GetAllOriginsOnIndexedDBThread,
+ base::Unretained(this), context, partition->GetPath()));
}
void IndexedDBInternalsUI::GetAllOrigins(const base::ListValue* args) {
@@ -114,12 +112,10 @@ void IndexedDBInternalsUI::GetAllOriginsOnIndexedDBThread(
bool is_incognito = context_impl->is_incognito();
BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::OnOriginsReady,
- base::Unretained(this),
- base::Passed(&info_list),
- is_incognito ? base::FilePath() : context_path));
+ BrowserThread::UI, FROM_HERE,
+ base::BindOnce(&IndexedDBInternalsUI::OnOriginsReady,
+ base::Unretained(this), base::Passed(&info_list),
+ is_incognito ? base::FilePath() : context_path));
}
void IndexedDBInternalsUI::OnOriginsReady(
@@ -191,8 +187,8 @@ void IndexedDBInternalsUI::DownloadOriginData(const base::ListValue* args) {
DCHECK(context.get());
context->TaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::DownloadOriginDataOnIndexedDBThread,
- base::Unretained(this), partition_path, context, origin));
+ base::BindOnce(&IndexedDBInternalsUI::DownloadOriginDataOnIndexedDBThread,
+ base::Unretained(this), partition_path, context, origin));
}
void IndexedDBInternalsUI::ForceCloseOrigin(const base::ListValue* args) {
@@ -206,8 +202,8 @@ void IndexedDBInternalsUI::ForceCloseOrigin(const base::ListValue* args) {
context->TaskRunner()->PostTask(
FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::ForceCloseOriginOnIndexedDBThread,
- base::Unretained(this), partition_path, context, origin));
+ base::BindOnce(&IndexedDBInternalsUI::ForceCloseOriginOnIndexedDBThread,
+ base::Unretained(this), partition_path, context, origin));
}
void IndexedDBInternalsUI::DownloadOriginDataOnIndexedDBThread(
@@ -243,9 +239,9 @@ void IndexedDBInternalsUI::DownloadOriginDataOnIndexedDBThread(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::OnDownloadDataReady,
- base::Unretained(this), partition_path, origin, temp_path,
- zip_path, connection_count));
+ base::BindOnce(&IndexedDBInternalsUI::OnDownloadDataReady,
+ base::Unretained(this), partition_path, origin, temp_path,
+ zip_path, connection_count));
}
void IndexedDBInternalsUI::ForceCloseOriginOnIndexedDBThread(
@@ -261,10 +257,10 @@ void IndexedDBInternalsUI::ForceCloseOriginOnIndexedDBThread(
context->ForceClose(origin, IndexedDBContextImpl::FORCE_CLOSE_INTERNALS_PAGE);
size_t connection_count = context->GetConnectionCount(origin);
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
- base::Bind(&IndexedDBInternalsUI::OnForcedClose, base::Unretained(this),
- partition_path, origin, connection_count));
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::BindOnce(&IndexedDBInternalsUI::OnForcedClose,
+ base::Unretained(this), partition_path,
+ origin, connection_count));
}
void IndexedDBInternalsUI::OnForcedClose(const base::FilePath& partition_path,
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_quota_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698