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

Unified Diff: net/base/cookie_monster.h

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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
Index: net/base/cookie_monster.h
===================================================================
--- net/base/cookie_monster.h (revision 3954)
+++ net/base/cookie_monster.h (working copy)
@@ -71,7 +71,7 @@
~CookieMonster();
// Parse the string with the cookie time (very forgivingly).
- static Time ParseCookieTime(const std::string& time_string);
+ static base::Time ParseCookieTime(const std::string& time_string);
// Set a single cookie. Expects a cookie line, like "a=1; domain=b.com".
bool SetCookie(const GURL& url, const std::string& cookie_line);
@@ -80,7 +80,7 @@
// internally).
bool SetCookieWithCreationTime(const GURL& url,
const std::string& cookie_line,
- const Time& creation_time);
+ const base::Time& creation_time);
// Set a vector of response cookie values for the same URL.
void SetCookies(const GURL& url, const std::vector<std::string>& cookies);
@@ -97,12 +97,12 @@
int DeleteAll(bool sync_to_store);
// Delete all of the cookies that have a creation_date greater than or equal
// to |delete_begin| and less than |delete_end|
- int DeleteAllCreatedBetween(const Time& delete_begin,
- const Time& delete_end,
+ int DeleteAllCreatedBetween(const base::Time& delete_begin,
+ const base::Time& delete_end,
bool sync_to_store);
// Delete all of the cookies that have a creation_date more recent than the
// one passed into the function via |delete_after|.
- int DeleteAllCreatedAfter(const Time& delete_begin, bool sync_to_store);
+ int DeleteAllCreatedAfter(const base::Time& delete_begin, bool sync_to_store);
// Delete one specific cookie.
bool DeleteCookie(const std::string& domain,
@@ -139,7 +139,7 @@
void FindCookiesForKey(const std::string& key,
const GURL& url,
CookieOptions options,
- const Time& current,
+ const base::Time& current,
std::vector<CanonicalCookie*>* cookies);
int DeleteEquivalentCookies(const std::string& key,
@@ -152,8 +152,8 @@
void InternalDeleteCookie(CookieMap::iterator it, bool sync_to_store);
// Enforce cookie maximum limits, purging expired and old cookies if needed
- int GarbageCollect(const Time& current, const std::string& key);
- int GarbageCollectRange(const Time& current,
+ int GarbageCollect(const base::Time& current, const std::string& key);
+ int GarbageCollectRange(const base::Time& current,
const CookieMapItPair& itpair,
size_t num_max,
size_t num_purge);
@@ -168,8 +168,8 @@
// The resolution of our time isn't enough, so we do something
// ugly and increment when we've seen the same time twice.
- Time CurrentTime();
- Time last_time_seen_;
+ base::Time CurrentTime();
+ base::Time last_time_seen_;
// Lock for thread-safety
Lock lock_;
@@ -237,8 +237,8 @@
public:
CanonicalCookie(const std::string& name, const std::string& value,
const std::string& path, bool secure,
- bool httponly, const Time& creation,
- bool has_expires, const Time& expires)
+ bool httponly, const base::Time& creation,
+ bool has_expires, const base::Time& expires)
: name_(name),
value_(value),
path_(path),
@@ -263,14 +263,14 @@
const std::string& Name() const { return name_; }
const std::string& Value() const { return value_; }
const std::string& Path() const { return path_; }
- const Time& CreationDate() const { return creation_date_; }
+ const base::Time& CreationDate() const { return creation_date_; }
bool DoesExpire() const { return has_expires_; }
bool IsPersistent() const { return DoesExpire(); }
- const Time& ExpiryDate() const { return expiry_date_; }
+ const base::Time& ExpiryDate() const { return expiry_date_; }
bool IsSecure() const { return secure_; }
bool IsHttpOnly() const { return httponly_; }
- bool IsExpired(const Time& current) {
+ bool IsExpired(const base::Time& current) {
return has_expires_ && current >= expiry_date_;
}
@@ -289,8 +289,8 @@
std::string name_;
std::string value_;
std::string path_;
- Time creation_date_;
- Time expiry_date_;
+ base::Time creation_date_;
+ base::Time expiry_date_;
bool has_expires_;
bool secure_;
bool httponly_;

Powered by Google App Engine
This is Rietveld 408576698