| Index: android_webview/native/cookie_manager.cc
|
| diff --git a/android_webview/native/cookie_manager.cc b/android_webview/native/cookie_manager.cc
|
| index c361ec8dcf532ee5d143774ee21c54d45d917a7a..e5e666844b68e8fa482c9621bed7e93515e2298a 100644
|
| --- a/android_webview/native/cookie_manager.cc
|
| +++ b/android_webview/native/cookie_manager.cc
|
| @@ -36,6 +36,7 @@
|
| #include "net/cookies/cookie_monster.h"
|
| #include "net/cookies/cookie_options.h"
|
| #include "net/cookies/cookie_store.h"
|
| +#include "net/cookies/parsed_cookie.h"
|
| #include "net/extras/sqlite/cookie_crypto_delegate.h"
|
| #include "net/url_request/url_request_context.h"
|
| #include "url/url_constants.h"
|
| @@ -385,6 +386,16 @@ void CookieManager::SetCookieHelper(
|
| net::CookieOptions options;
|
| options.set_include_httponly();
|
|
|
| + // Log message for catching strict secure cookies related bugs.
|
| + if (!host.has_scheme() || host.SchemeIs(url::kHttpScheme)) {
|
| + net::ParsedCookie parsed_cookie(value);
|
| + if (parsed_cookie.IsValid() && parsed_cookie.IsSecure()) {
|
| + LOG(WARNING) << "Strict Secure Cookie policy does not allow setting a "
|
| + "secure cookie for "
|
| + << host.spec();
|
| + }
|
| + }
|
| +
|
| GetCookieStore()->SetCookieWithOptionsAsync(host, value, options, callback);
|
| }
|
|
|
|
|