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_message_loop.h" | 10 #include "base/memory/ref_counted_delete_on_message_loop.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 const GURL& url, | 111 const GURL& url, |
112 const std::string& name, | 112 const std::string& name, |
113 const std::string& value, | 113 const std::string& value, |
114 const std::string& domain, | 114 const std::string& domain, |
115 const std::string& path, | 115 const std::string& path, |
116 base::Time creation_time, | 116 base::Time creation_time, |
117 base::Time expiration_time, | 117 base::Time expiration_time, |
118 base::Time last_access_time, | 118 base::Time last_access_time, |
119 bool secure, | 119 bool secure, |
120 bool http_only, | 120 bool http_only, |
121 bool same_site, | 121 net::CookieSameSite same_site, |
122 bool enforce_strict_secure, | 122 bool enforce_strict_secure, |
123 net::CookiePriority priority, | 123 net::CookiePriority priority, |
124 const net::CookieStore::SetCookiesCallback& callback) { | 124 const net::CookieStore::SetCookiesCallback& callback) { |
125 GetCookieStore()->SetCookieWithDetailsAsync( | 125 GetCookieStore()->SetCookieWithDetailsAsync( |
126 url, name, value, domain, path, creation_time, expiration_time, | 126 url, name, value, domain, path, creation_time, expiration_time, |
127 last_access_time, secure, http_only, same_site, enforce_strict_secure, | 127 last_access_time, secure, http_only, same_site, enforce_strict_secure, |
128 priority, callback); | 128 priority, callback); |
129 } | 129 } |
130 | 130 |
131 void GetCookiesWithOptionsAsyncOnCookieThread( | 131 void GetCookiesWithOptionsAsyncOnCookieThread( |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 const GURL& url, | 212 const GURL& url, |
213 const std::string& name, | 213 const std::string& name, |
214 const std::string& value, | 214 const std::string& value, |
215 const std::string& domain, | 215 const std::string& domain, |
216 const std::string& path, | 216 const std::string& path, |
217 base::Time creation_time, | 217 base::Time creation_time, |
218 base::Time expiration_time, | 218 base::Time expiration_time, |
219 base::Time last_access_time, | 219 base::Time last_access_time, |
220 bool secure, | 220 bool secure, |
221 bool http_only, | 221 bool http_only, |
222 bool same_site, | 222 net::CookieSameSite same_site, |
223 bool enforce_strict_secure, | 223 bool enforce_strict_secure, |
224 net::CookiePriority priority, | 224 net::CookiePriority priority, |
225 const SetCookiesCallback& callback) { | 225 const SetCookiesCallback& callback) { |
226 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 226 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
227 PostTaskToCookieStoreTaskRunner( | 227 PostTaskToCookieStoreTaskRunner( |
228 base::Bind(&SetCookieWithDetailsAsyncOnCookieThread, url, name, value, | 228 base::Bind(&SetCookieWithDetailsAsyncOnCookieThread, url, name, value, |
229 domain, path, creation_time, expiration_time, last_access_time, | 229 domain, path, creation_time, expiration_time, last_access_time, |
230 secure, http_only, same_site, enforce_strict_secure, priority, | 230 secure, http_only, same_site, enforce_strict_secure, priority, |
231 CreateWrappedCallback<bool>(callback))); | 231 CreateWrappedCallback<bool>(callback))); |
232 } | 232 } |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, | 348 base::Bind(&AwCookieStoreWrapper::RunClosureCallback, |
349 weak_factory_.GetWeakPtr(), callback)); | 349 weak_factory_.GetWeakPtr(), callback)); |
350 } | 350 } |
351 | 351 |
352 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { | 352 void AwCookieStoreWrapper::RunClosureCallback(const base::Closure& callback) { |
353 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); | 353 DCHECK(client_task_runner_->RunsTasksOnCurrentThread()); |
354 callback.Run(); | 354 callback.Run(); |
355 } | 355 } |
356 | 356 |
357 } // namespace android_webview | 357 } // namespace android_webview |
OLD | NEW |