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

Unified Diff: net/cookies/cookie_monster.cc

Issue 18032002: Wait for store flush in CookieMonster::Delete*Task (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm blank lines Created 7 years, 3 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_unittest.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 f24637735fd44a3be289b58bec803081a1e25739..151c3e0e521507c9eaca1ecc2f102bcad40e3d24 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -104,9 +104,8 @@ const size_t CookieMonster::kPurgeCookies = 300;
const size_t CookieMonster::kDomainCookiesQuotaLow = 30;
const size_t CookieMonster::kDomainCookiesQuotaMedium = 50;
const size_t CookieMonster::kDomainCookiesQuotaHigh =
- CookieMonster::kDomainMaxCookies - CookieMonster::kDomainPurgeCookies
- - CookieMonster::kDomainCookiesQuotaLow
- - CookieMonster::kDomainCookiesQuotaMedium;
+ kDomainMaxCookies - kDomainPurgeCookies
+ - kDomainCookiesQuotaLow - kDomainCookiesQuotaMedium;
const int CookieMonster::kSafeFromGlobalPurgeDays = 30;
@@ -399,13 +398,12 @@ void CookieMonster::CookieMonsterTask::InvokeCallback(base::Closure callback) {
callback.Run();
} else {
thread_->PostTask(FROM_HERE, base::Bind(
- &CookieMonster::CookieMonsterTask::InvokeCallback, this, callback));
+ &CookieMonsterTask::InvokeCallback, this, callback));
}
}
// Task class for SetCookieWithDetails call.
-class CookieMonster::SetCookieWithDetailsTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::SetCookieWithDetailsTask : public CookieMonsterTask {
public:
SetCookieWithDetailsTask(CookieMonster* cookie_monster,
const GURL& url,
@@ -417,7 +415,7 @@ class CookieMonster::SetCookieWithDetailsTask
bool secure,
bool http_only,
CookiePriority priority,
- const CookieMonster::SetCookiesCallback& callback)
+ const SetCookiesCallback& callback)
: CookieMonsterTask(cookie_monster),
url_(url),
name_(name),
@@ -431,7 +429,7 @@ class CookieMonster::SetCookieWithDetailsTask
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
protected:
@@ -447,7 +445,7 @@ class CookieMonster::SetCookieWithDetailsTask
bool secure_;
bool http_only_;
CookiePriority priority_;
- CookieMonster::SetCookiesCallback callback_;
+ SetCookiesCallback callback_;
DISALLOW_COPY_AND_ASSIGN(SetCookieWithDetailsTask);
};
@@ -457,29 +455,28 @@ void CookieMonster::SetCookieWithDetailsTask::Run() {
SetCookieWithDetails(url_, name_, value_, domain_, path_,
expiration_time_, secure_, http_only_, priority_);
if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::SetCookiesCallback::Run,
+ this->InvokeCallback(base::Bind(&SetCookiesCallback::Run,
base::Unretained(&callback_), success));
}
}
// Task class for GetAllCookies call.
-class CookieMonster::GetAllCookiesTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::GetAllCookiesTask : public CookieMonsterTask {
public:
GetAllCookiesTask(CookieMonster* cookie_monster,
- const CookieMonster::GetCookieListCallback& callback)
+ const GetCookieListCallback& callback)
: CookieMonsterTask(cookie_monster),
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask
+ // CookieMonsterTask
virtual void Run() OVERRIDE;
protected:
virtual ~GetAllCookiesTask() {}
private:
- CookieMonster::GetCookieListCallback callback_;
+ GetCookieListCallback callback_;
DISALLOW_COPY_AND_ASSIGN(GetAllCookiesTask);
};
@@ -487,27 +484,27 @@ class CookieMonster::GetAllCookiesTask
void CookieMonster::GetAllCookiesTask::Run() {
if (!callback_.is_null()) {
CookieList cookies = this->cookie_monster()->GetAllCookies();
- this->InvokeCallback(base::Bind(&CookieMonster::GetCookieListCallback::Run,
+ this->InvokeCallback(base::Bind(&GetCookieListCallback::Run,
base::Unretained(&callback_), cookies));
}
}
// Task class for GetAllCookiesForURLWithOptions call.
class CookieMonster::GetAllCookiesForURLWithOptionsTask
- : public CookieMonster::CookieMonsterTask {
+ : public CookieMonsterTask {
public:
GetAllCookiesForURLWithOptionsTask(
CookieMonster* cookie_monster,
const GURL& url,
const CookieOptions& options,
- const CookieMonster::GetCookieListCallback& callback)
+ const GetCookieListCallback& callback)
: CookieMonsterTask(cookie_monster),
url_(url),
options_(options),
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
protected:
@@ -516,7 +513,7 @@ class CookieMonster::GetAllCookiesForURLWithOptionsTask
private:
GURL url_;
CookieOptions options_;
- CookieMonster::GetCookieListCallback callback_;
+ GetCookieListCallback callback_;
DISALLOW_COPY_AND_ASSIGN(GetAllCookiesForURLWithOptionsTask);
};
@@ -525,56 +522,109 @@ void CookieMonster::GetAllCookiesForURLWithOptionsTask::Run() {
if (!callback_.is_null()) {
CookieList cookies = this->cookie_monster()->
GetAllCookiesForURLWithOptions(url_, options_);
- this->InvokeCallback(base::Bind(&CookieMonster::GetCookieListCallback::Run,
+ this->InvokeCallback(base::Bind(&GetCookieListCallback::Run,
base::Unretained(&callback_), cookies));
}
}
-// Task class for DeleteAll call.
-class CookieMonster::DeleteAllTask : public CookieMonster::CookieMonsterTask {
+template <typename Result> struct CallbackType {
+ typedef base::Callback<void(Result)> Type;
+};
+
+template <> struct CallbackType<void> {
+ typedef base::Closure Type;
+};
+
+// Base task class for Delete*Task.
+template <typename Result>
+class CookieMonster::DeleteTask : public CookieMonsterTask {
public:
- DeleteAllTask(CookieMonster* cookie_monster,
- const CookieMonster::DeleteCallback& callback)
+ DeleteTask(CookieMonster* cookie_monster,
+ const typename CallbackType<Result>::Type& callback)
: CookieMonsterTask(cookie_monster),
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
+ private:
+ // Runs the delete task and returns a result.
+ virtual Result RunDeleteTask() = 0;
+ base::Closure RunDeleteTaskAndBindCallback();
+ void FlushDone(const base::Closure& callback);
+
+ typename CallbackType<Result>::Type callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeleteTask);
+};
+
+template <typename Result>
+base::Closure CookieMonster::DeleteTask<Result>::
+RunDeleteTaskAndBindCallback() {
+ Result result = RunDeleteTask();
+ if (callback_.is_null())
+ return base::Closure();
+ return base::Bind(callback_, result);
+}
+
+template <>
+base::Closure CookieMonster::DeleteTask<void>::RunDeleteTaskAndBindCallback() {
+ RunDeleteTask();
+ return callback_;
+}
+
+template <typename Result>
+void CookieMonster::DeleteTask<Result>::Run() {
+ this->cookie_monster()->FlushStore(
+ base::Bind(&DeleteTask<Result>::FlushDone, this,
+ RunDeleteTaskAndBindCallback()));
+}
+
+template <typename Result>
+void CookieMonster::DeleteTask<Result>::FlushDone(
+ const base::Closure& callback) {
+ if (!callback.is_null()) {
+ this->InvokeCallback(callback);
+ }
+}
+
+// Task class for DeleteAll call.
+class CookieMonster::DeleteAllTask : public DeleteTask<int> {
+ public:
+ DeleteAllTask(CookieMonster* cookie_monster,
+ const DeleteCallback& callback)
+ : DeleteTask(cookie_monster, callback) {
+ }
+
+ // DeleteTask:
+ virtual int RunDeleteTask() OVERRIDE;
+
protected:
virtual ~DeleteAllTask() {}
private:
- CookieMonster::DeleteCallback callback_;
-
DISALLOW_COPY_AND_ASSIGN(DeleteAllTask);
};
-void CookieMonster::DeleteAllTask::Run() {
- int num_deleted = this->cookie_monster()->DeleteAll(true);
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCallback::Run,
- base::Unretained(&callback_), num_deleted));
- }
+int CookieMonster::DeleteAllTask::RunDeleteTask() {
+ return this->cookie_monster()->DeleteAll(true);
}
// Task class for DeleteAllCreatedBetween call.
-class CookieMonster::DeleteAllCreatedBetweenTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::DeleteAllCreatedBetweenTask : public DeleteTask<int> {
public:
DeleteAllCreatedBetweenTask(CookieMonster* cookie_monster,
const Time& delete_begin,
const Time& delete_end,
- const CookieMonster::DeleteCallback& callback)
- : CookieMonsterTask(cookie_monster),
+ const DeleteCallback& callback)
+ : DeleteTask(cookie_monster, callback),
delete_begin_(delete_begin),
- delete_end_(delete_end),
- callback_(callback) {
+ delete_end_(delete_end) {
}
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual int RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteAllCreatedBetweenTask() {}
@@ -582,72 +632,59 @@ class CookieMonster::DeleteAllCreatedBetweenTask
private:
Time delete_begin_;
Time delete_end_;
- CookieMonster::DeleteCallback callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteAllCreatedBetweenTask);
};
-void CookieMonster::DeleteAllCreatedBetweenTask::Run() {
- int num_deleted = this->cookie_monster()->
+int CookieMonster::DeleteAllCreatedBetweenTask::RunDeleteTask() {
+ return this->cookie_monster()->
DeleteAllCreatedBetween(delete_begin_, delete_end_);
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCallback::Run,
- base::Unretained(&callback_), num_deleted));
- }
}
// Task class for DeleteAllForHost call.
-class CookieMonster::DeleteAllForHostTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::DeleteAllForHostTask : public DeleteTask<int> {
public:
DeleteAllForHostTask(CookieMonster* cookie_monster,
const GURL& url,
- const CookieMonster::DeleteCallback& callback)
- : CookieMonsterTask(cookie_monster),
- url_(url),
- callback_(callback) {
+ const DeleteCallback& callback)
+ : DeleteTask(cookie_monster, callback),
+ url_(url) {
}
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual int RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteAllForHostTask() {}
private:
GURL url_;
- CookieMonster::DeleteCallback callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteAllForHostTask);
};
-void CookieMonster::DeleteAllForHostTask::Run() {
- int num_deleted = this->cookie_monster()->DeleteAllForHost(url_);
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCallback::Run,
- base::Unretained(&callback_), num_deleted));
- }
+int CookieMonster::DeleteAllForHostTask::RunDeleteTask() {
+ return this->cookie_monster()->DeleteAllForHost(url_);
}
// Task class for DeleteAllCreatedBetweenForHost call.
class CookieMonster::DeleteAllCreatedBetweenForHostTask
- : public CookieMonster::CookieMonsterTask {
+ : public DeleteTask<int> {
public:
DeleteAllCreatedBetweenForHostTask(
CookieMonster* cookie_monster,
Time delete_begin,
Time delete_end,
const GURL& url,
- const CookieMonster::DeleteCallback& callback)
- : CookieMonsterTask(cookie_monster),
+ const DeleteCallback& callback)
+ : DeleteTask(cookie_monster, callback),
delete_begin_(delete_begin),
delete_end_(delete_end),
- url_(url),
- callback_(callback) {
+ url_(url) {
}
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual int RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteAllCreatedBetweenForHostTask() {}
@@ -656,62 +693,49 @@ class CookieMonster::DeleteAllCreatedBetweenForHostTask
Time delete_begin_;
Time delete_end_;
GURL url_;
- CookieMonster::DeleteCallback callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteAllCreatedBetweenForHostTask);
};
-void CookieMonster::DeleteAllCreatedBetweenForHostTask::Run() {
- int num_deleted = this->cookie_monster()->DeleteAllCreatedBetweenForHost(
+int CookieMonster::DeleteAllCreatedBetweenForHostTask::RunDeleteTask() {
+ return this->cookie_monster()->DeleteAllCreatedBetweenForHost(
delete_begin_, delete_end_, url_);
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCallback::Run,
- base::Unretained(&callback_), num_deleted));
- }
}
// Task class for DeleteCanonicalCookie call.
-class CookieMonster::DeleteCanonicalCookieTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::DeleteCanonicalCookieTask : public DeleteTask<bool> {
public:
DeleteCanonicalCookieTask(CookieMonster* cookie_monster,
const CanonicalCookie& cookie,
- const CookieMonster::DeleteCookieCallback& callback)
- : CookieMonsterTask(cookie_monster),
- cookie_(cookie),
- callback_(callback) {
+ const DeleteCookieCallback& callback)
+ : DeleteTask(cookie_monster, callback),
+ cookie_(cookie) {
}
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual bool RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteCanonicalCookieTask() {}
private:
CanonicalCookie cookie_;
- CookieMonster::DeleteCookieCallback callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteCanonicalCookieTask);
};
-void CookieMonster::DeleteCanonicalCookieTask::Run() {
- bool result = this->cookie_monster()->DeleteCanonicalCookie(cookie_);
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCookieCallback::Run,
- base::Unretained(&callback_), result));
- }
+bool CookieMonster::DeleteCanonicalCookieTask::RunDeleteTask() {
+ return this->cookie_monster()->DeleteCanonicalCookie(cookie_);
}
// Task class for SetCookieWithOptions call.
-class CookieMonster::SetCookieWithOptionsTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::SetCookieWithOptionsTask : public CookieMonsterTask {
public:
SetCookieWithOptionsTask(CookieMonster* cookie_monster,
const GURL& url,
const std::string& cookie_line,
const CookieOptions& options,
- const CookieMonster::SetCookiesCallback& callback)
+ const SetCookiesCallback& callback)
: CookieMonsterTask(cookie_monster),
url_(url),
cookie_line_(cookie_line),
@@ -719,7 +743,7 @@ class CookieMonster::SetCookieWithOptionsTask
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
protected:
@@ -729,7 +753,7 @@ class CookieMonster::SetCookieWithOptionsTask
GURL url_;
std::string cookie_line_;
CookieOptions options_;
- CookieMonster::SetCookiesCallback callback_;
+ SetCookiesCallback callback_;
DISALLOW_COPY_AND_ASSIGN(SetCookieWithOptionsTask);
};
@@ -738,26 +762,25 @@ void CookieMonster::SetCookieWithOptionsTask::Run() {
bool result = this->cookie_monster()->
SetCookieWithOptions(url_, cookie_line_, options_);
if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::SetCookiesCallback::Run,
+ this->InvokeCallback(base::Bind(&SetCookiesCallback::Run,
base::Unretained(&callback_), result));
}
}
// Task class for GetCookiesWithOptions call.
-class CookieMonster::GetCookiesWithOptionsTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::GetCookiesWithOptionsTask : public CookieMonsterTask {
public:
GetCookiesWithOptionsTask(CookieMonster* cookie_monster,
const GURL& url,
const CookieOptions& options,
- const CookieMonster::GetCookiesCallback& callback)
+ const GetCookiesCallback& callback)
: CookieMonsterTask(cookie_monster),
url_(url),
options_(options),
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
protected:
@@ -766,7 +789,7 @@ class CookieMonster::GetCookiesWithOptionsTask
private:
GURL url_;
CookieOptions options_;
- CookieMonster::GetCookiesCallback callback_;
+ GetCookiesCallback callback_;
DISALLOW_COPY_AND_ASSIGN(GetCookiesWithOptionsTask);
};
@@ -775,26 +798,25 @@ void CookieMonster::GetCookiesWithOptionsTask::Run() {
std::string cookie = this->cookie_monster()->
GetCookiesWithOptions(url_, options_);
if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::GetCookiesCallback::Run,
+ this->InvokeCallback(base::Bind(&GetCookiesCallback::Run,
base::Unretained(&callback_), cookie));
}
}
// Task class for DeleteCookie call.
-class CookieMonster::DeleteCookieTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::DeleteCookieTask : public DeleteTask<void> {
public:
DeleteCookieTask(CookieMonster* cookie_monster,
const GURL& url,
const std::string& cookie_name,
const base::Closure& callback)
- : CookieMonsterTask(cookie_monster),
+ : DeleteTask(cookie_monster, callback),
url_(url),
- cookie_name_(cookie_name),
- callback_(callback) { }
+ cookie_name_(cookie_name) {
+ }
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual void RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteCookieTask() {}
@@ -802,61 +824,50 @@ class CookieMonster::DeleteCookieTask
private:
GURL url_;
std::string cookie_name_;
- base::Closure callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteCookieTask);
};
-void CookieMonster::DeleteCookieTask::Run() {
+void CookieMonster::DeleteCookieTask::RunDeleteTask() {
this->cookie_monster()->DeleteCookie(url_, cookie_name_);
- if (!callback_.is_null()) {
- this->InvokeCallback(callback_);
- }
}
// Task class for DeleteSessionCookies call.
-class CookieMonster::DeleteSessionCookiesTask
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::DeleteSessionCookiesTask : public DeleteTask<int> {
public:
DeleteSessionCookiesTask(CookieMonster* cookie_monster,
- const CookieMonster::DeleteCallback& callback)
- : CookieMonsterTask(cookie_monster), callback_(callback) {
+ const DeleteCallback& callback)
+ : DeleteTask(cookie_monster, callback) {
}
- // CookieMonster::CookieMonsterTask:
- virtual void Run() OVERRIDE;
+ // DeleteTask:
+ virtual int RunDeleteTask() OVERRIDE;
protected:
virtual ~DeleteSessionCookiesTask() {}
private:
- CookieMonster::DeleteCallback callback_;
DISALLOW_COPY_AND_ASSIGN(DeleteSessionCookiesTask);
};
-void CookieMonster::DeleteSessionCookiesTask::Run() {
- int num_deleted = this->cookie_monster()->DeleteSessionCookies();
- if (!callback_.is_null()) {
- this->InvokeCallback(base::Bind(&CookieMonster::DeleteCallback::Run,
- base::Unretained(&callback_), num_deleted));
- }
+int CookieMonster::DeleteSessionCookiesTask::RunDeleteTask() {
+ return this->cookie_monster()->DeleteSessionCookies();
}
// Task class for HasCookiesForETLDP1Task call.
-class CookieMonster::HasCookiesForETLDP1Task
- : public CookieMonster::CookieMonsterTask {
+class CookieMonster::HasCookiesForETLDP1Task : public CookieMonsterTask {
public:
HasCookiesForETLDP1Task(
CookieMonster* cookie_monster,
const std::string& etldp1,
- const CookieMonster::HasCookiesForETLDP1Callback& callback)
+ const HasCookiesForETLDP1Callback& callback)
: CookieMonsterTask(cookie_monster),
etldp1_(etldp1),
callback_(callback) {
}
- // CookieMonster::CookieMonsterTask:
+ // CookieMonsterTask:
virtual void Run() OVERRIDE;
protected:
@@ -864,7 +875,7 @@ class CookieMonster::HasCookiesForETLDP1Task
private:
std::string etldp1_;
- CookieMonster::HasCookiesForETLDP1Callback callback_;
+ HasCookiesForETLDP1Callback callback_;
DISALLOW_COPY_AND_ASSIGN(HasCookiesForETLDP1Task);
};
@@ -873,7 +884,7 @@ void CookieMonster::HasCookiesForETLDP1Task::Run() {
bool result = this->cookie_monster()->HasCookiesForETLDP1(etldp1_);
if (!callback_.is_null()) {
this->InvokeCallback(
- base::Bind(&CookieMonster::HasCookiesForETLDP1Callback::Run,
+ base::Bind(&HasCookiesForETLDP1Callback::Run,
base::Unretained(&callback_), result));
}
}
@@ -1639,7 +1650,7 @@ int CookieMonster::TrimDuplicateCookiesForKey(
const char* CookieMonster::kDefaultCookieableSchemes[] =
{ "http", "https", "file" };
const int CookieMonster::kDefaultCookieableSchemesCount =
- arraysize(CookieMonster::kDefaultCookieableSchemes);
+ arraysize(kDefaultCookieableSchemes);
void CookieMonster::SetDefaultCookieableSchemes() {
int num_schemes = default_enable_file_scheme_ ?
@@ -1744,7 +1755,7 @@ void CookieMonster::InternalInsertCookie(const std::string& key,
cookies_.insert(CookieMap::value_type(key, cc));
if (delegate_.get()) {
delegate_->OnCookieChanged(
- *cc, false, CookieMonster::Delegate::CHANGE_COOKIE_EXPLICIT);
+ *cc, false, Delegate::CHANGE_COOKIE_EXPLICIT);
}
}
@@ -2015,8 +2026,8 @@ int CookieMonster::GarbageCollectExpired(
int CookieMonster::GarbageCollectDeleteRange(
const Time& current,
DeletionCause cause,
- CookieMonster::CookieItVector::iterator it_begin,
- CookieMonster::CookieItVector::iterator it_end) {
+ CookieItVector::iterator it_begin,
+ CookieItVector::iterator it_end) {
for (CookieItVector::iterator it = it_begin; it != it_end; it++) {
histogram_evicted_last_access_minutes_->Add(
(current - (*it)->second->LastAccessDate()).InMinutes());
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | net/cookies/cookie_monster_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698