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

Side by Side Diff: ios/net/cookies/cookie_store_ios_test_util.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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/net/cookies/cookie_store_ios_test_util.h" 5 #include "ios/net/cookies/cookie_store_ios_test_util.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void TestPersistentCookieStore::AddCookie(const net::CanonicalCookie& cc) {} 74 void TestPersistentCookieStore::AddCookie(const net::CanonicalCookie& cc) {}
75 75
76 void TestPersistentCookieStore::UpdateCookieAccessTime( 76 void TestPersistentCookieStore::UpdateCookieAccessTime(
77 const net::CanonicalCookie& cc) {} 77 const net::CanonicalCookie& cc) {}
78 78
79 void TestPersistentCookieStore::DeleteCookie(const net::CanonicalCookie& cc) {} 79 void TestPersistentCookieStore::DeleteCookie(const net::CanonicalCookie& cc) {}
80 80
81 void TestPersistentCookieStore::SetForceKeepSessionState() {} 81 void TestPersistentCookieStore::SetForceKeepSessionState() {}
82 82
83 void TestPersistentCookieStore::Flush(const base::Closure& callback) { 83 void TestPersistentCookieStore::Flush(base::OnceClosure callback) {
84 flushed_ = true; 84 flushed_ = true;
85 } 85 }
86 86
87 #pragma mark - 87 #pragma mark -
88 #pragma mark GetCookieCallback 88 #pragma mark GetCookieCallback
89 89
90 GetCookieCallback::GetCookieCallback() : did_run_(false) {} 90 GetCookieCallback::GetCookieCallback() : did_run_(false) {}
91 91
92 #pragma mark - 92 #pragma mark -
93 #pragma mark GetCookieCallback methods 93 #pragma mark GetCookieCallback methods
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 void ClearCookies() { 133 void ClearCookies() {
134 NSHTTPCookieStorage* store = [NSHTTPCookieStorage sharedHTTPCookieStorage]; 134 NSHTTPCookieStorage* store = [NSHTTPCookieStorage sharedHTTPCookieStorage];
135 [store setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways]; 135 [store setCookieAcceptPolicy:NSHTTPCookieAcceptPolicyAlways];
136 NSArray* cookies = [store cookies]; 136 NSArray* cookies = [store cookies];
137 for (NSHTTPCookie* cookie in cookies) 137 for (NSHTTPCookie* cookie in cookies)
138 [store deleteCookie:cookie]; 138 [store deleteCookie:cookie];
139 EXPECT_EQ(0u, [[store cookies] count]); 139 EXPECT_EQ(0u, [[store cookies] count]);
140 } 140 }
141 141
142 } // namespace net 142 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698