Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Unified Diff: android_webview/browser/net/aw_cookie_store_wrapper.cc

Issue 2882063002: Add a SetCanonicalCookie method for CookieMonster. (Closed)
Patch Set: Fix iOS behavior for secure cookies. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: android_webview/browser/net/aw_cookie_store_wrapper.cc
diff --git a/android_webview/browser/net/aw_cookie_store_wrapper.cc b/android_webview/browser/net/aw_cookie_store_wrapper.cc
index 70f7b4c031793bb3b56e796d94ce032516bbb3e5..546d017541bd102a18445a774f04beabc3187c44 100644
--- a/android_webview/browser/net/aw_cookie_store_wrapper.cc
+++ b/android_webview/browser/net/aw_cookie_store_wrapper.cc
@@ -128,6 +128,15 @@ void SetCookieWithDetailsAsyncOnCookieThread(
last_access_time, secure, http_only, same_site, priority, callback);
}
+void SetCanonicalCookieAsyncOnCookieThread(
+ const net::CanonicalCookie& cookie,
+ bool secure_source,
+ bool modify_http_only,
+ const net::CookieStore::SetCookiesCallback& callback) {
+ GetCookieStore()->SetCanonicalCookieAsync(cookie, secure_source,
+ modify_http_only, callback);
+}
+
void GetCookiesWithOptionsAsyncOnCookieThread(
const GURL& url,
const net::CookieOptions& options,
@@ -230,6 +239,17 @@ void AwCookieStoreWrapper::SetCookieWithDetailsAsync(
CreateWrappedCallback<bool>(callback)));
}
+void AwCookieStoreWrapper::SetCanonicalCookieAsync(
+ const net::CanonicalCookie& cookie,
+ bool secure_source,
+ bool modify_http_only,
+ const SetCookiesCallback& callback) {
+ DCHECK(client_task_runner_->RunsTasksOnCurrentThread());
+ PostTaskToCookieStoreTaskRunner(
+ base::Bind(&SetCanonicalCookieAsyncOnCookieThread, cookie, secure_source,
+ modify_http_only, CreateWrappedCallback<bool>(callback)));
+}
+
void AwCookieStoreWrapper::GetCookiesWithOptionsAsync(
const GURL& url,
const net::CookieOptions& options,

Powered by Google App Engine
This is Rietveld 408576698