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

Unified Diff: net/cookies/cookie_monster_unittest.cc

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_monster_unittest.cc
diff --git a/net/cookies/cookie_monster_unittest.cc b/net/cookies/cookie_monster_unittest.cc
index 6878898f63df1b5b784b997fe0258e4248b39cd9..aace43fb9d765966355da59559f0080ef48aaf8f 100644
--- a/net/cookies/cookie_monster_unittest.cc
+++ b/net/cookies/cookie_monster_unittest.cc
@@ -59,9 +59,10 @@ class NewMockPersistentCookieStore
MOCK_METHOD1(AddCookie, void(const CanonicalCookie& cc));
MOCK_METHOD1(UpdateCookieAccessTime, void(const CanonicalCookie& cc));
MOCK_METHOD1(DeleteCookie, void(const CanonicalCookie& cc));
- virtual void Flush(const base::Closure& callback) {
+ virtual void Flush(base::OnceClosure callback) {
if (!callback.is_null())
- base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
+ std::move(callback));
}
MOCK_METHOD0(SetForceKeepSessionState, void());
@@ -2455,10 +2456,10 @@ class FlushablePersistentStore : public CookieMonster::PersistentCookieStore {
void DeleteCookie(const CanonicalCookie&) override {}
void SetForceKeepSessionState() override {}
- void Flush(const base::Closure& callback) override {
+ void Flush(base::OnceClosure callback) override {
++flush_count_;
if (!callback.is_null())
- callback.Run();
+ std::move(callback).Run();
}
int flush_count() { return flush_count_; }

Powered by Google App Engine
This is Rietveld 408576698