wrapper: Convert usage of base::Bind to Once or Repeating (see issue #3140)

This commit is contained in:
Marshall Greenblatt
2021-06-19 15:35:12 -04:00
parent cc2759d07e
commit ed1840ddb5
4 changed files with 57 additions and 50 deletions

View File

@@ -83,8 +83,9 @@ struct CefDeleteOnThread {
if (CefCurrentlyOn(thread)) {
delete x;
} else {
CefPostTask(thread, base::Bind(&CefDeleteOnThread<thread>::Destruct<T>,
base::Unretained(x)));
CefPostTask(thread,
base::BindOnce(&CefDeleteOnThread<thread>::Destruct<T>,
base::Unretained(x)));
}
}
};

View File

@@ -66,14 +66,15 @@ class CefResourceManager
// file extension. |url| will be fully qualified and may contain query or
// fragment components.
///
typedef base::Callback<std::string(const std::string& /*url*/)> UrlFilter;
using UrlFilter =
base::RepeatingCallback<std::string(const std::string& /*url*/)>;
///
// Used to resolve mime types for URLs, usually based on the file extension.
// |url| will be fully qualified and may contain query or fragment components.
///
typedef base::Callback<std::string(const std::string& /*url*/)>
MimeTypeResolver;
using MimeTypeResolver =
base::RepeatingCallback<std::string(const std::string& /*url*/)>;
private:
// Values that stay with a request as it moves between providers.