summaryrefslogtreecommitdiffstats
path: root/net/base/cookie_monster_store_test.cc
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-30 01:44:29 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-30 01:44:29 +0000
commit8155f1a70fb66b287df28784bab5235eb07ceb44 (patch)
tree80cec32822c451dd81b2b2af72fdd0722a4e0a7d /net/base/cookie_monster_store_test.cc
parentf402503e9d2461d38f864560edac4c62b245a427 (diff)
downloadchromium_src-8155f1a70fb66b287df28784bab5235eb07ceb44.zip
chromium_src-8155f1a70fb66b287df28784bab5235eb07ceb44.tar.gz
chromium_src-8155f1a70fb66b287df28784bab5235eb07ceb44.tar.bz2
MAC Cookies (patch 1 of N)
This is the first patch towards implementing https://github.com/hueniverse/draft-hammer-http-mac/raw/master/draft-hammer-oauth-v2-mac-token.txt Parse MAC-Key and MAC-Algorithm from Set-Cookie and store the values in memory. Future patches will use these values to sign requests. Review URL: http://codereview.chromium.org/6883253 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/cookie_monster_store_test.cc')
-rw-r--r--net/base/cookie_monster_store_test.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/base/cookie_monster_store_test.cc b/net/base/cookie_monster_store_test.cc
index 3fcaa29..b3a6c13 100644
--- a/net/base/cookie_monster_store_test.cc
+++ b/net/base/cookie_monster_store_test.cc
@@ -95,6 +95,7 @@ void AddCookieToList(
scoped_ptr<CookieMonster::CanonicalCookie> cookie(
new CookieMonster::CanonicalCookie(
GURL(), pc.Name(), pc.Value(), key, cookie_path,
+ pc.MACKey(), pc.MACAlgorithm(),
creation_time, creation_time, cookie_expires,
pc.IsSecure(), pc.IsHttpOnly(),
!cookie_expires.is_null()));
@@ -163,10 +164,13 @@ CookieMonster* CreateMonsterFromStoreForGC(
(i < num_old_cookies) ? current - base::TimeDelta::FromDays(days_old) :
current;
+ std::string mac_key;
+ std::string mac_algorithm;
+
CookieMonster::CanonicalCookie cc(
GURL(), "a", "1", base::StringPrintf("h%05d.izzle", i), "/path",
- creation_time, expiration_time, last_access_time,
- false, false, true);
+ mac_key, mac_algorithm, creation_time, expiration_time,
+ last_access_time, false, false, true);
store->AddCookie(cc);
}