OLD | NEW |
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #import "ios/net/cookies/cookie_store_ios_persistent.h" | 5 #import "ios/net/cookies/cookie_store_ios_persistent.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "ios/net/cookies/system_cookie_util.h" | 9 #include "ios/net/cookies/system_cookie_util.h" |
10 #include "net/cookies/cookie_monster.h" | 10 #include "net/cookies/cookie_monster.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 CookiePriority priority, | 50 CookiePriority priority, |
51 const SetCookiesCallback& callback) { | 51 const SetCookiesCallback& callback) { |
52 DCHECK(thread_checker().CalledOnValidThread()); | 52 DCHECK(thread_checker().CalledOnValidThread()); |
53 | 53 |
54 cookie_monster()->SetCookieWithDetailsAsync( | 54 cookie_monster()->SetCookieWithDetailsAsync( |
55 url, name, value, domain, path, creation_time, expiration_time, | 55 url, name, value, domain, path, creation_time, expiration_time, |
56 last_access_time, secure, http_only, same_site, priority, | 56 last_access_time, secure, http_only, same_site, priority, |
57 WrapSetCallback(callback)); | 57 WrapSetCallback(callback)); |
58 } | 58 } |
59 | 59 |
| 60 void CookieStoreIOSPersistent::SetCanonicalCookieAsync( |
| 61 std::unique_ptr<CanonicalCookie> cookie, |
| 62 bool secure_source, |
| 63 bool modify_http_only, |
| 64 const SetCookiesCallback& callback) { |
| 65 DCHECK(thread_checker().CalledOnValidThread()); |
| 66 |
| 67 cookie_monster()->SetCanonicalCookieAsync(std::move(cookie), secure_source, |
| 68 modify_http_only, |
| 69 WrapSetCallback(callback)); |
| 70 } |
| 71 |
60 void CookieStoreIOSPersistent::GetCookiesWithOptionsAsync( | 72 void CookieStoreIOSPersistent::GetCookiesWithOptionsAsync( |
61 const GURL& url, | 73 const GURL& url, |
62 const net::CookieOptions& options, | 74 const net::CookieOptions& options, |
63 const GetCookiesCallback& callback) { | 75 const GetCookiesCallback& callback) { |
64 DCHECK(thread_checker().CalledOnValidThread()); | 76 DCHECK(thread_checker().CalledOnValidThread()); |
65 cookie_monster()->GetCookiesWithOptionsAsync(url, options, callback); | 77 cookie_monster()->GetCookiesWithOptionsAsync(url, options, callback); |
66 } | 78 } |
67 | 79 |
68 void CookieStoreIOSPersistent::GetCookieListWithOptionsAsync( | 80 void CookieStoreIOSPersistent::GetCookieListWithOptionsAsync( |
69 const GURL& url, | 81 const GURL& url, |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 144 } |
133 | 145 |
134 #pragma mark - | 146 #pragma mark - |
135 #pragma mark Private methods | 147 #pragma mark Private methods |
136 | 148 |
137 void CookieStoreIOSPersistent::WriteToCookieMonster(NSArray* system_cookies) {} | 149 void CookieStoreIOSPersistent::WriteToCookieMonster(NSArray* system_cookies) {} |
138 | 150 |
139 void CookieStoreIOSPersistent::OnSystemCookiesChanged() {} | 151 void CookieStoreIOSPersistent::OnSystemCookiesChanged() {} |
140 | 152 |
141 } // namespace net | 153 } // namespace net |
OLD | NEW |