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

Unified Diff: ios/net/cookies/cookie_store_ios_persistent_unittest.mm

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: ios/net/cookies/cookie_store_ios_persistent_unittest.mm
diff --git a/ios/net/cookies/cookie_store_ios_persistent_unittest.mm b/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
index 85706f608f672c4aece73605fe1aa677c8c43198..eb7ed90cc8e726b47afcac2d4c3a4179c25dc376 100644
--- a/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
+++ b/ios/net/cookies/cookie_store_ios_persistent_unittest.mm
@@ -63,10 +63,11 @@ class CookieStoreIOSPersistentTest : public testing::Test {
~CookieStoreIOSPersistentTest() override {}
// Gets the cookies. |callback| will be called on completion.
- void GetCookies(const net::CookieStore::GetCookiesCallback& callback) {
+ void GetCookies(net::CookieStore::GetCookiesCallback callback) {
net::CookieOptions options;
options.set_include_httponly();
- store_->GetCookiesWithOptionsAsync(kTestCookieURL, options, callback);
+ store_->GetCookiesWithOptionsAsync(kTestCookieURL, options,
+ std::move(callback));
}
// Sets a cookie.
@@ -119,7 +120,8 @@ TEST_F(CookieStoreIOSPersistentTest, SetCookieCallsHook) {
TEST_F(CookieStoreIOSPersistentTest, NotSynchronized) {
// Start fetching the cookie.
GetCookieCallback callback;
- GetCookies(base::Bind(&GetCookieCallback::Run, base::Unretained(&callback)));
+ GetCookies(
+ base::BindOnce(&GetCookieCallback::Run, base::Unretained(&callback)));
// Backend loading completes.
backend_->RunLoadedCallback();
EXPECT_TRUE(callback.did_run());

Powered by Google App Engine
This is Rietveld 408576698