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

Side by Side Diff: net/base/cookie_monster.h

Issue 8571008: Revert 110099 - Creation of cookie_utils. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_cookies_helpers.cc ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Brought to you by the letter D and the number 2. 5 // Brought to you by the letter D and the number 2.
6 6
7 #ifndef NET_BASE_COOKIE_MONSTER_H_ 7 #ifndef NET_BASE_COOKIE_MONSTER_H_
8 #define NET_BASE_COOKIE_MONSTER_H_ 8 #define NET_BASE_COOKIE_MONSTER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 CookieMonster(PersistentCookieStore* store, Delegate* delegate); 139 CookieMonster(PersistentCookieStore* store, Delegate* delegate);
140 140
141 // Only used during unit testing. 141 // Only used during unit testing.
142 CookieMonster(PersistentCookieStore* store, 142 CookieMonster(PersistentCookieStore* store,
143 Delegate* delegate, 143 Delegate* delegate,
144 int last_access_threshold_milliseconds); 144 int last_access_threshold_milliseconds);
145 145
146 // Parses the string with the cookie time (very forgivingly). 146 // Parses the string with the cookie time (very forgivingly).
147 static base::Time ParseCookieTime(const std::string& time_string); 147 static base::Time ParseCookieTime(const std::string& time_string);
148 148
149 // Returns true if a domain string represents a host-only cookie,
150 // i.e. it doesn't begin with a leading '.' character.
151 static bool DomainIsHostOnly(const std::string& domain_string);
152
149 // Helper function that adds all cookies from |list| into this instance. 153 // Helper function that adds all cookies from |list| into this instance.
150 bool InitializeFrom(const CookieList& list); 154 bool InitializeFrom(const CookieList& list);
151 155
152 typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback; 156 typedef base::Callback<void(const CookieList& cookies)> GetCookieListCallback;
153 typedef base::Callback<void(int num_deleted)> DeleteCallback; 157 typedef base::Callback<void(int num_deleted)> DeleteCallback;
154 typedef base::Callback<void(bool success)> DeleteCookieCallback; 158 typedef base::Callback<void(bool success)> DeleteCookieCallback;
155 159
156 // Sets a cookie given explicit user-provided cookie attributes. The cookie 160 // Sets a cookie given explicit user-provided cookie attributes. The cookie
157 // name, value, domain, etc. are each provided as separate strings. This 161 // name, value, domain, etc. are each provided as separate strings. This
158 // function expects each attribute to be well-formed. It will check for 162 // function expects each attribute to be well-formed. It will check for
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 private: 994 private:
991 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 995 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
992 }; 996 };
993 997
994 class CookieList : public std::vector<CookieMonster::CanonicalCookie> { 998 class CookieList : public std::vector<CookieMonster::CanonicalCookie> {
995 }; 999 };
996 1000
997 } // namespace net 1001 } // namespace net
998 1002
999 #endif // NET_BASE_COOKIE_MONSTER_H_ 1003 #endif // NET_BASE_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_cookies_helpers.cc ('k') | net/base/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698