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

Unified Diff: net/cookies/cookie_store_test_helpers.h

Issue 2937963003: Shift cookie system callbacks to OnceCallback to impedance match mojo. (Closed)
Patch Set: Finish Merge 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: net/cookies/cookie_store_test_helpers.h
diff --git a/net/cookies/cookie_store_test_helpers.h b/net/cookies/cookie_store_test_helpers.h
index 7a9c34c09662f43e47c15b948d49b8391709bab6..bd55a3de6f002e2551acfc5ce96452465c58b3c6 100644
--- a/net/cookies/cookie_store_test_helpers.h
+++ b/net/cookies/cookie_store_test_helpers.h
@@ -29,7 +29,7 @@ class DelayedCookieMonster : public CookieStore {
const GURL& url,
const std::string& cookie_line,
const CookieOptions& options,
- const CookieMonster::SetCookiesCallback& callback) override;
+ CookieMonster::SetCookiesCallback callback) override;
void SetCookieWithDetailsAsync(const GURL& url,
const std::string& name,
@@ -43,24 +43,23 @@ class DelayedCookieMonster : public CookieStore {
bool http_only,
CookieSameSite same_site,
CookiePriority priority,
- const SetCookiesCallback& callback) override;
+ SetCookiesCallback callback) override;
void SetCanonicalCookieAsync(std::unique_ptr<CanonicalCookie> cookie,
bool secure_source,
bool modify_http_only,
- const SetCookiesCallback& callback) override;
+ SetCookiesCallback callback) override;
void GetCookiesWithOptionsAsync(
const GURL& url,
const CookieOptions& options,
- const CookieMonster::GetCookiesCallback& callback) override;
+ CookieMonster::GetCookiesCallback callback) override;
- void GetCookieListWithOptionsAsync(
- const GURL& url,
- const CookieOptions& options,
- const GetCookieListCallback& callback) override;
+ void GetCookieListWithOptionsAsync(const GURL& url,
+ const CookieOptions& options,
+ GetCookieListCallback callback) override;
- void GetAllCookiesAsync(const GetCookieListCallback& callback) override;
+ void GetAllCookiesAsync(GetCookieListCallback callback) override;
virtual bool SetCookieWithOptions(const GURL& url,
const std::string& cookie_line,
@@ -74,24 +73,24 @@ class DelayedCookieMonster : public CookieStore {
void DeleteCookieAsync(const GURL& url,
const std::string& cookie_name,
- const base::Closure& callback) override;
+ base::OnceClosure callback) override;
void DeleteCanonicalCookieAsync(const CanonicalCookie& cookie,
- const DeleteCallback& callback) override;
+ DeleteCallback callback) override;
void DeleteAllCreatedBetweenAsync(const base::Time& delete_begin,
const base::Time& delete_end,
- const DeleteCallback& callback) override;
+ DeleteCallback callback) override;
void DeleteAllCreatedBetweenWithPredicateAsync(
const base::Time& delete_begin,
const base::Time& delete_end,
const base::Callback<bool(const CanonicalCookie&)>& predicate,
- const DeleteCallback& callback) override;
+ DeleteCallback callback) override;
- void DeleteSessionCookiesAsync(const DeleteCallback&) override;
+ void DeleteSessionCookiesAsync(DeleteCallback) override;
- void FlushStore(const base::Closure& callback) override;
+ void FlushStore(base::OnceClosure callback) override;
std::unique_ptr<CookieStore::CookieChangedSubscription> AddCallbackForCookie(
const GURL& url,
@@ -110,14 +109,13 @@ class DelayedCookieMonster : public CookieStore {
// Invoke the original callbacks.
- void InvokeSetCookiesCallback(
- const CookieMonster::SetCookiesCallback& callback);
+ void InvokeSetCookiesCallback(CookieMonster::SetCookiesCallback callback);
void InvokeGetCookieStringCallback(
- const CookieMonster::GetCookiesCallback& callback);
+ CookieMonster::GetCookiesCallback callback);
void InvokeGetCookieListCallback(
- const CookieMonster::GetCookieListCallback& callback);
+ CookieMonster::GetCookieListCallback callback);
friend class base::RefCountedThreadSafe<DelayedCookieMonster>;

Powered by Google App Engine
This is Rietveld 408576698