Index: headless/public/util/testing/generic_url_request_mocks.cc |
diff --git a/headless/public/util/testing/generic_url_request_mocks.cc b/headless/public/util/testing/generic_url_request_mocks.cc |
index a4053dc9e1c1432638132a22abcbfd5236853106..844945c0a987a147c5484c7467c2558b2b21066b 100644 |
--- a/headless/public/util/testing/generic_url_request_mocks.cc |
+++ b/headless/public/util/testing/generic_url_request_mocks.cc |
@@ -63,24 +63,23 @@ void MockCookieStore::SetCookieWithOptionsAsync( |
const GURL& url, |
const std::string& cookie_line, |
const net::CookieOptions& options, |
- const SetCookiesCallback& callback) { |
+ SetCookiesCallback callback) { |
CHECK(false); |
} |
-void MockCookieStore::SetCookieWithDetailsAsync( |
- const GURL& url, |
- const std::string& name, |
- const std::string& value, |
- const std::string& domain, |
- const std::string& path, |
- base::Time creation_time, |
- base::Time expiration_time, |
- base::Time last_access_time, |
- bool secure, |
- bool http_only, |
- net::CookieSameSite same_site, |
- net::CookiePriority priority, |
- const SetCookiesCallback& callback) { |
+void MockCookieStore::SetCookieWithDetailsAsync(const GURL& url, |
+ const std::string& name, |
+ const std::string& value, |
+ const std::string& domain, |
+ const std::string& path, |
+ base::Time creation_time, |
+ base::Time expiration_time, |
+ base::Time last_access_time, |
+ bool secure, |
+ bool http_only, |
+ net::CookieSameSite same_site, |
+ net::CookiePriority priority, |
+ SetCookiesCallback callback) { |
CHECK(false); |
} |
@@ -88,47 +87,47 @@ void MockCookieStore::SetCanonicalCookieAsync( |
std::unique_ptr<net::CanonicalCookie> cookie, |
bool secure_source, |
bool can_modify_httponly, |
- const SetCookiesCallback& callback) { |
+ SetCookiesCallback callback) { |
CHECK(false); |
} |
void MockCookieStore::GetCookiesWithOptionsAsync( |
const GURL& url, |
const net::CookieOptions& options, |
- const GetCookiesCallback& callback) { |
+ GetCookiesCallback callback) { |
CHECK(false); |
} |
void MockCookieStore::GetCookieListWithOptionsAsync( |
const GURL& url, |
const net::CookieOptions& options, |
- const GetCookieListCallback& callback) { |
+ GetCookieListCallback callback) { |
base::ThreadTaskRunnerHandle::Get()->PostTask( |
- FROM_HERE, base::Bind(&MockCookieStore::SendCookies, |
- base::Unretained(this), url, options, callback)); |
+ FROM_HERE, |
+ base::BindOnce(&MockCookieStore::SendCookies, base::Unretained(this), url, |
+ options, std::move(callback))); |
} |
-void MockCookieStore::GetAllCookiesAsync( |
- const GetCookieListCallback& callback) { |
+void MockCookieStore::GetAllCookiesAsync(GetCookieListCallback callback) { |
CHECK(false); |
} |
void MockCookieStore::DeleteCookieAsync(const GURL& url, |
const std::string& cookie_name, |
- const base::Closure& callback) { |
+ base::OnceClosure callback) { |
CHECK(false); |
} |
void MockCookieStore::DeleteCanonicalCookieAsync( |
const net::CanonicalCookie& cookie, |
- const DeleteCallback& callback) { |
+ DeleteCallback callback) { |
CHECK(false); |
} |
void MockCookieStore::DeleteAllCreatedBetweenAsync( |
const base::Time& delete_begin, |
const base::Time& delete_end, |
- const DeleteCallback& callback) { |
+ DeleteCallback callback) { |
CHECK(false); |
} |
@@ -136,15 +135,15 @@ void MockCookieStore::DeleteAllCreatedBetweenWithPredicateAsync( |
const base::Time& delete_begin, |
const base::Time& delete_end, |
const CookiePredicate& predicate, |
- const DeleteCallback& callback) { |
+ DeleteCallback callback) { |
CHECK(false); |
} |
-void MockCookieStore::DeleteSessionCookiesAsync(const DeleteCallback&) { |
+void MockCookieStore::DeleteSessionCookiesAsync(DeleteCallback) { |
CHECK(false); |
} |
-void MockCookieStore::FlushStore(const base::Closure& callback) { |
+void MockCookieStore::FlushStore(base::OnceClosure callback) { |
CHECK(false); |
} |
@@ -167,13 +166,13 @@ bool MockCookieStore::IsEphemeral() { |
void MockCookieStore::SendCookies(const GURL& url, |
const net::CookieOptions& options, |
- const GetCookieListCallback& callback) { |
+ GetCookieListCallback callback) { |
net::CookieList result; |
for (const auto& cookie : cookies_) { |
if (cookie.IncludeForRequestURL(url, options)) |
result.push_back(cookie); |
} |
- callback.Run(result); |
+ std::move(callback).Run(result); |
} |
// MockURLRequestDelegate |