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 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ | 5 #ifndef IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ |
6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ | 6 #define IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 private: | 32 private: |
33 // net::CookieMonster::PersistentCookieStore implementation: | 33 // net::CookieMonster::PersistentCookieStore implementation: |
34 void Load(const LoadedCallback& loaded_callback) override; | 34 void Load(const LoadedCallback& loaded_callback) override; |
35 void LoadCookiesForKey(const std::string& key, | 35 void LoadCookiesForKey(const std::string& key, |
36 const LoadedCallback& loaded_callback) override; | 36 const LoadedCallback& loaded_callback) override; |
37 void AddCookie(const net::CanonicalCookie& cc) override; | 37 void AddCookie(const net::CanonicalCookie& cc) override; |
38 void UpdateCookieAccessTime(const net::CanonicalCookie& cc) override; | 38 void UpdateCookieAccessTime(const net::CanonicalCookie& cc) override; |
39 void DeleteCookie(const net::CanonicalCookie& cc) override; | 39 void DeleteCookie(const net::CanonicalCookie& cc) override; |
40 void SetForceKeepSessionState() override; | 40 void SetForceKeepSessionState() override; |
41 void Flush(const base::Closure& callback) override; | 41 void Flush(base::OnceClosure callback) override; |
42 | 42 |
43 ~TestPersistentCookieStore() override; | 43 ~TestPersistentCookieStore() override; |
44 | 44 |
45 const GURL kTestCookieURL; | 45 const GURL kTestCookieURL; |
46 LoadedCallback loaded_callback_; | 46 LoadedCallback loaded_callback_; |
47 bool flushed_; | 47 bool flushed_; |
48 }; | 48 }; |
49 | 49 |
50 // Helper callback to be passed to CookieStore::GetCookiesWithOptionsAsync(). | 50 // Helper callback to be passed to CookieStore::GetCookiesWithOptionsAsync(). |
51 class GetCookieCallback { | 51 class GetCookieCallback { |
(...skipping 22 matching lines...) Expand all Loading... |
74 void SetCookie(const std::string& cookie_line, | 74 void SetCookie(const std::string& cookie_line, |
75 const GURL& url, | 75 const GURL& url, |
76 net::CookieStore* store); | 76 net::CookieStore* store); |
77 | 77 |
78 // Clears the underlying NSHTTPCookieStorage. | 78 // Clears the underlying NSHTTPCookieStorage. |
79 void ClearCookies(); | 79 void ClearCookies(); |
80 | 80 |
81 } // namespace net | 81 } // namespace net |
82 | 82 |
83 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ | 83 #endif // IOS_NET_COOKIES_COOKIE_STORE_IOS_TEST_UTIL_H_ |
OLD | NEW |