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

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

Issue 2882063002: Add a SetCanonicalCookie method for CookieMonster. (Closed)
Patch Set: Fix try jobs and do some cleanup. Created 3 years, 7 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 811e775cda493acc74d111e630a9240e784ec0b2..50822abb7e9e2b3bcd08b6c4f25008e677abd34f 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