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

Unified Diff: net/base/cookie_monster.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 | « net/base/cookie_monster.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/cookie_monster.cc
===================================================================
--- net/base/cookie_monster.cc (revision 38820)
+++ net/base/cookie_monster.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1135,6 +1135,20 @@
return out;
}
+CookieMonster::CanonicalCookie::CanonicalCookie(const GURL& url,
+ const ParsedCookie& pc)
+ : name_(pc.Name()),
+ value_(pc.Value()),
+ path_(CanonPath(url, pc)),
+ creation_date_(Time::Now()),
+ last_access_date_(Time()),
+ has_expires_(pc.HasExpires()),
+ secure_(pc.IsSecure()),
+ httponly_(pc.IsHttpOnly()) {
+ if (has_expires_)
+ expiry_date_ = CanonExpiration(pc, creation_date_, CookieOptions());
+}
+
bool CookieMonster::CanonicalCookie::IsOnPath(
const std::string& url_path) const {
« no previous file with comments | « net/base/cookie_monster.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698