OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "android_webview/browser/net/aw_cookie_store_wrapper.h" | 5 #include "android_webview/browser/net/aw_cookie_store_wrapper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "android_webview/browser/net/init_native_callback.h" | 9 #include "android_webview/browser/net/init_native_callback.h" |
10 #include "base/memory/ref_counted_delete_on_sequence.h" | 10 #include "base/memory/ref_counted_delete_on_sequence.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 const std::string& name, | 114 const std::string& name, |
115 const std::string& value, | 115 const std::string& value, |
116 const std::string& domain, | 116 const std::string& domain, |
117 const std::string& path, | 117 const std::string& path, |
118 base::Time creation_time, | 118 base::Time creation_time, |
119 base::Time expiration_time, | 119 base::Time expiration_time, |
120 base::Time last_access_time, | 120 base::Time last_access_time, |
121 bool secure, | 121 bool secure, |
122 bool http_only, | 122 bool http_only, |
123 net::CookieSameSite same_site, | 123 net::CookieSameSite same_site, |
124 bool enforce_strict_secure, | |
125 net::CookiePriority priority, | 124 net::CookiePriority priority, |
126 const net::CookieStore::SetCookiesCallback& callback) { | 125 const net::CookieStore::SetCookiesCallback& callback) { |
127 GetCookieStore()->SetCookieWithDetailsAsync( | 126 GetCookieStore()->SetCookieWithDetailsAsync( |
128 url, name, value, domain, path, creation_time, expiration_time, | 127 url, name, value, domain, path, creation_time, expiration_time, |
129 last_access_time, secure, http_only, same_site, enforce_strict_secure, | 128 last_access_time, secure, http_only, same_site, priority, callback); |
130 priority, callback); | |
131 } | 129 } |
132 | 130 |
133 void GetCookiesWithOptionsAsyncOnCookieThread( | 131 void GetCookiesWithOptionsAsyncOnCookieThread( |
134 const GURL& url, | 132 const GURL& url, |
135 const net::CookieOptions& options, | 133 const net::CookieOptions& options, |
136 const net::CookieStore::GetCookiesCallback& callback) { | 134 const net::CookieStore::GetCookiesCallback& callback) { |
137 GetCookieStore()->GetCookiesWithOptionsAsync(url, options, callback); | 135 GetCookieStore()->GetCookiesWithOptionsAsync(url, options, callback); |
138 } | 136 } |
139 | 137 |
140 void GetCookieListWithOptionsAsyncOnCookieThread( | 138 void GetCookieListWithOptionsAsyncOnCookieThread( |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 const std::string& name, | 213 const std::string& name, |
216 const std::string& value, | 214 const std::string& value, |
217 const std::string& domain, | 215 const std::string& domain, |
218 const std::string& path, | 216 const std::string& path, |
219 base::Time creation_time, | 217 base::Time creation_time, |
220 base::Time expiration_time, | 218 base::Time expiration_time, |
221 base::Time last_access_time, | 219 base::Time last_access_time, |
222 bool secure, | 220 bool secure, |
223 bool http_only, | 221 bool http_only, |
224 net::CookieSameSite same_site, | 222 net::CookieSameSite same_site, |
225 bool enforce_strict_secure, | |
226 net::CookiePriority priority, | 223 net::CookiePriority priority, |
227 const SetCookiesCallback& callback) { | 224 const SetCookiesCallback& callback) { |
228 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 225 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
229 PostTaskToCookieStoreTaskRunner( | 226 PostTaskToCookieStoreTaskRunner( |
230 base::Bind(&SetCookieWithDetailsAsyncOnCookieThread, url, name, value, | 227 base::Bind(&SetCookieWithDetailsAsyncOnCookieThread, url, name, value, |
231 domain, path, creation_time, expiration_time, last_access_time, | 228 domain, path, creation_time, expiration_time, last_access_time, |
232 secure, http_only, same_site, enforce_strict_secure, priority, | 229 secure, http_only, same_site, priority, |
233 CreateWrappedCallback<bool>(callback))); | 230 CreateWrappedCallback<bool>(callback))); |
234 } | 231 } |
235 | 232 |
236 void AwCookieStoreWrapper::GetCookiesWithOptionsAsync( | 233 void AwCookieStoreWrapper::GetCookiesWithOptionsAsync( |
237 const GURL& url, | 234 const GURL& url, |
238 const net::CookieOptions& options, | 235 const net::CookieOptions& options, |
239 const GetCookiesCallback& callback) { | 236 const GetCookiesCallback& callback) { |
240 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 237 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
241 PostTaskToCookieStoreTaskRunner( | 238 PostTaskToCookieStoreTaskRunner( |
242 base::Bind(&GetCookiesWithOptionsAsyncOnCookieThread, url, options, | 239 base::Bind(&GetCookiesWithOptionsAsyncOnCookieThread, url, options, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
350 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, | 347 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, |
351 weak_factory_.GetWeakPtr(), callback)); | 348 weak_factory_.GetWeakPtr(), callback)); |
352 } | 349 } |
353 | 350 |
354 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { | 351 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { |
355 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 352 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
356 callback.Run(); | 353 callback.Run(); |
357 } | 354 } |
358 | 355 |
359 } // namespace android_webview | 356 } // namespace android_webview |
OLD | NEW |