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

Unified Diff: extensions/browser/extension_user_script_loader.cc

Issue 2898523002: Remove the usage of BrowserThread::FILE in web_ui_user_script_loader.cc (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | extensions/browser/user_script_loader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_user_script_loader.cc
diff --git a/extensions/browser/extension_user_script_loader.cc b/extensions/browser/extension_user_script_loader.cc
index e08e28acbb1d16180086758457c853ef4c143fb9..689fa8d0fe9265e1a59cfbaa21471c399b0bb3d9 100644
--- a/extensions/browser/extension_user_script_loader.cc
+++ b/extensions/browser/extension_user_script_loader.cc
@@ -6,8 +6,11 @@
#include <stddef.h>
+#include <map>
+#include <memory>
#include <set>
#include <string>
+#include <utility>
#include "base/bind.h"
#include "base/bind_helpers.h"
@@ -163,7 +166,8 @@ void LoadScriptsOnFileThread(
UserScriptLoader::Serialize(*user_scripts);
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
- base::Bind(callback, base::Passed(&user_scripts), base::Passed(&memory)));
+ base::BindOnce(std::move(callback), std::move(user_scripts),
+ std::move(memory)));
}
} // namespace
@@ -212,8 +216,9 @@ void ExtensionUserScriptLoader::LoadScripts(
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
- base::Bind(&LoadScriptsOnFileThread, base::Passed(&user_scripts),
- hosts_info_, added_script_ids, content_verifier_, callback));
+ base::BindOnce(&LoadScriptsOnFileThread, std::move(user_scripts),
+ hosts_info_, added_script_ids, content_verifier_,
+ std::move(callback)));
}
void ExtensionUserScriptLoader::UpdateHostsInfo(
« no previous file with comments | « no previous file | extensions/browser/user_script_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698