Commit a94b7c0f authored by Dylan Cutler's avatar Dylan Cutler Committed by Commit Bot

Use CanonicalCookie::FromStorage in CanonicalCookieFromSystemCookie.

This change is part of a larger cleanup effort to make the bare
CanonicalCookie constructor private. The factory method, FromStorage,
is used for loading cookies that have already entered the user agent's
storage model into a CanonicalCookie.

Bug: 1102874
Change-Id: Iaef8b2773e596c72073dc8bce61f6fd8253d0a66
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2504089Reviewed-by: default avatarLily Chen <chlily@chromium.org>
Reviewed-by: default avatarMark Cogan <marq@chromium.org>
Commit-Queue: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/master@{#821748}
parent 37d5b43d
...@@ -89,7 +89,7 @@ net::CanonicalCookie CanonicalCookieFromSystemCookie( ...@@ -89,7 +89,7 @@ net::CanonicalCookie CanonicalCookieFromSystemCookie(
same_site = net::CookieSameSite::NO_RESTRICTION; same_site = net::CookieSameSite::NO_RESTRICTION;
} }
return net::CanonicalCookie( return *std::move(net::CanonicalCookie::FromStorage(
base::SysNSStringToUTF8([cookie name]), base::SysNSStringToUTF8([cookie name]),
base::SysNSStringToUTF8([cookie value]), base::SysNSStringToUTF8([cookie value]),
base::SysNSStringToUTF8([cookie domain]), base::SysNSStringToUTF8([cookie domain]),
...@@ -98,7 +98,7 @@ net::CanonicalCookie CanonicalCookieFromSystemCookie( ...@@ -98,7 +98,7 @@ net::CanonicalCookie CanonicalCookieFromSystemCookie(
base::Time(), [cookie isSecure], [cookie isHTTPOnly], same_site, base::Time(), [cookie isSecure], [cookie isHTTPOnly], same_site,
// When iOS begins to support 'Priority' attribute, pass it // When iOS begins to support 'Priority' attribute, pass it
// through here. // through here.
net::COOKIE_PRIORITY_DEFAULT); net::COOKIE_PRIORITY_DEFAULT, net::CookieSourceScheme::kUnset));
} }
void ReportGetCookiesForURLResult(SystemCookieStoreType store_type, void ReportGetCookiesForURLResult(SystemCookieStoreType store_type,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment