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

Unified Diff: chrome/browser/views/cookie_info_view.cc

Issue 597031: Avoid showing the user a garbage path attribute when the cookie doesn't have ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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
« no previous file with comments | « chrome/browser/views/cookie_info_view.h ('k') | chrome/browser/views/cookie_prompt_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/cookie_info_view.cc
===================================================================
--- chrome/browser/views/cookie_info_view.cc (revision 38820)
+++ chrome/browser/views/cookie_info_view.cc (working copy)
@@ -88,23 +88,11 @@
Layout();
}
-void CookieInfoView::SetCookieString(
- const std::string& host,
- const std::string& cookie_line) {
+void CookieInfoView::SetCookieString(const GURL& url,
+ const std::string& cookie_line) {
net::CookieMonster::ParsedCookie pc(cookie_line);
- net::CookieMonster::CanonicalCookie cookie(
- pc.Name(),
- pc.Value(),
- pc.Path(),
- pc.IsSecure(),
- pc.IsHttpOnly(),
- base::Time::Now(), // creation time
- base::Time(), // last access time is unused
- pc.HasExpires(),
- pc.HasExpires() ?
- net::CookieMonster::ParseCookieTime(pc.Expires()) :
- base::Time());
- SetCookie(pc.HasDomain() ? pc.Domain() : host, cookie);
+ net::CookieMonster::CanonicalCookie cookie(url, pc);
+ SetCookie(pc.HasDomain() ? pc.Domain() : url.host(), cookie);
}
« no previous file with comments | « chrome/browser/views/cookie_info_view.h ('k') | chrome/browser/views/cookie_prompt_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698