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

Unified Diff: net/base/cookie_monster.cc

Issue 7355025: Creat BrowsingDataCookieHelper and CannedBrowsingDataCookieHelper for logging cookies at UI thread. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 4 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 95818)
+++ net/base/cookie_monster.cc (working copy)
@@ -2152,6 +2152,31 @@
}
CookieMonster::CanonicalCookie* CookieMonster::CanonicalCookie::Create(
+ const GURL& url,
+ const ParsedCookie& pc) {
+ if (!pc.IsValid()) {
+ return NULL;
+ }
+
+ std::string domain_string;
+ if (!GetCookieDomain(url, pc, &domain_string)) {
+ return NULL;
+ }
+ std::string path_string = CanonPath(url, pc);;
+ std::string mac_key = pc.HasMACKey() ? pc.MACKey() : std::string();
+ std::string mac_algorithm = pc.HasMACAlgorithm() ?
+ pc.MACAlgorithm() : std::string();
+ Time creation_time = Time::Now();
+ Time expiration_time;
+ if (pc.HasExpires())
+ expiration_time = net::CookieMonster::ParseCookieTime(pc.Expires());
+
+ return (Create(url, pc.Name(), pc.Value(), domain_string, path_string,
+ mac_key, mac_algorithm, creation_time, expiration_time,
+ pc.IsSecure(), pc.IsHttpOnly()));
+}
+
+CookieMonster::CanonicalCookie* CookieMonster::CanonicalCookie::Create(
const GURL& url,
const std::string& name,
const std::string& value,
« 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