OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |