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

Unified Diff: net/cookies/cookie_monster.cc

Issue 14113014: Adding Priority field to cookies. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed enums PRIORITY_* to COOKIE_PRIORITY_*. Created 7 years, 8 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/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index 61e7f26594451969ca225678f2cdf1e0efc73bc7..29990d85e8af849823f31ddbbcb301d8dbbda44b 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -382,6 +382,7 @@ class CookieMonster::SetCookieWithDetailsTask
const base::Time& expiration_time,
bool secure,
bool http_only,
+ CookiePriority priority,
const CookieMonster::SetCookiesCallback& callback)
: CookieMonsterTask(cookie_monster),
url_(url),
@@ -392,6 +393,7 @@ class CookieMonster::SetCookieWithDetailsTask
expiration_time_(expiration_time),
secure_(secure),
http_only_(http_only),
+ priority_(priority),
callback_(callback) {
}
@@ -410,6 +412,7 @@ class CookieMonster::SetCookieWithDetailsTask
base::Time expiration_time_;
bool secure_;
bool http_only_;
+ CookiePriority priority_;
CookieMonster::SetCookiesCallback callback_;
DISALLOW_COPY_AND_ASSIGN(SetCookieWithDetailsTask);
@@ -418,7 +421,7 @@ class CookieMonster::SetCookieWithDetailsTask
void CookieMonster::SetCookieWithDetailsTask::Run() {
bool success = this->cookie_monster()->
SetCookieWithDetails(url_, name_, value_, domain_, path_,
- expiration_time_, secure_, http_only_);
+ expiration_time_, secure_, http_only_, priority_);
if (!callback_.is_null()) {
this->InvokeCallback(base::Bind(&CookieMonster::SetCookiesCallback::Run,
base::Unretained(&callback_), success));
@@ -776,10 +779,11 @@ void CookieMonster::SetCookieWithDetailsAsync(
const base::Time& expiration_time,
bool secure,
bool http_only,
+ CookiePriority priority,
const SetCookiesCallback& callback) {
scoped_refptr<SetCookieWithDetailsTask> task =
new SetCookieWithDetailsTask(this, url, name, value, domain, path,
- expiration_time, secure, http_only,
+ expiration_time, secure, http_only, priority,
callback);
DoCookieTaskForURL(task, url);
@@ -935,7 +939,8 @@ bool CookieMonster::SetCookieWithDetails(const GURL& url,
const std::string& path,
const base::Time& expiration_time,
bool secure,
- bool http_only) {
+ bool http_only,
+ CookiePriority priority) {
base::AutoLock autolock(lock_);
if (!HasCookieableScheme(url))
@@ -945,10 +950,9 @@ bool CookieMonster::SetCookieWithDetails(const GURL& url,
last_time_seen_ = creation_time;
scoped_ptr<CanonicalCookie> cc;
- cc.reset(CanonicalCookie::Create(
- url, name, value, domain, path,
- creation_time, expiration_time,
- secure, http_only));
+ cc.reset(CanonicalCookie::Create(url, name, value, domain, path,
+ creation_time, expiration_time,
+ secure, http_only, priority));
if (!cc.get())
return false;
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_store_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698