Commit 82937e55 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Remove FetchParam parameter from fetch closure

The closure in case is ContentHash::DidFetchVerifiedContents
which takes a |const FetchParams&| parameter, but does not use it.
This CL removes it.

This is a driven by simplication as part of the preparation for
making FetchParams non-copyable.

Next, FetchParams will store a scoped_refptr<network::SharedURLLoaderFactory>
rather than a raw network::mojom::URLLoaderFactory pointer.

BUG=844926

Change-Id: I237c93be558f4cc7c65c5de2f73e8722a246863d
Reviewed-on: https://chromium-review.googlesource.com/1089272Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Cr-Commit-Position: refs/heads/master@{#565043}
parent 9e27a974
......@@ -53,9 +53,8 @@ void ContentHashFetcher::OnURLFetchComplete(const net::URLFetcher* source) {
response = nullptr;
}
response_task_runner_->PostTask(
FROM_HERE,
base::BindOnce(std::move(hash_fetcher_callback_), extension_key_,
fetch_params_, std::move(response)));
FROM_HERE, base::BindOnce(std::move(hash_fetcher_callback_),
extension_key_, std::move(response)));
delete this;
}
......
......@@ -48,7 +48,6 @@ class ContentHashFetcher : public net::URLFetcherDelegate {
// The response contents is passed through std::unique_ptr<std::string>.
using HashFetcherCallback =
base::OnceCallback<void(const ContentHash::ExtensionKey&,
const ContentHash::FetchParams&,
std::unique_ptr<std::string>)>;
ContentHashFetcher(const ContentHash::ExtensionKey& extension_key,
......
......@@ -169,7 +169,6 @@ void ContentHash::DidFetchVerifiedContents(
ContentHash::CreatedCallback created_callback,
const ContentHash::IsCancelledCallback& is_cancelled,
const ContentHash::ExtensionKey& key,
const ContentHash::FetchParams& fetch_params,
std::unique_ptr<std::string> fetched_contents) {
base::AssertBlockingAllowed();
if (!fetched_contents) {
......
......@@ -153,7 +153,6 @@ class ContentHash : public base::RefCountedThreadSafe<ContentHash> {
CreatedCallback created_callback,
const IsCancelledCallback& is_cancelled,
const ExtensionKey& key,
const FetchParams& fetch_params,
std::unique_ptr<std::string> fetched_contents);
static void DispatchFetchFailure(const ExtensionKey& key,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment