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

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

Issue 8465022: Creation of cookie_utils. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix compilation on windows 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
« no previous file with comments | « net/base/cookie_monster_unittest.cc ('k') | net/base/cookie_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef NET_BASE_COOKIE_UTILS_H_
wtc 2011/11/10 19:29:29 Please name these two files cookie_util.h and cook
6 #define NET_BASE_COOKIE_UTILS_H_
7 #pragma once
8
9 #include <string>
10
11 class GURL;
12
13 namespace net {
14 namespace cookie_utils {
wtc 2011/11/10 19:29:29 Same with the namespace name: please remove the 's
15
16 // Returns the effective TLD+1 for a given host. This only makes sense for http
17 // and https schemes. For other schemes, the host will be returned unchanged
18 // (minus any leading period).
19 std::string GetEffectiveDomain(const std::string& scheme,
20 const std::string& host);
21
22 // Determine the actual cookie domain based on the domain string passed
23 // (if any) and the URL from which the cookie came.
24 // On success returns true, and sets cookie_domain to either a
25 // -host cookie domain (ex: "google.com")
26 // -domain cookie domain (ex: ".google.com")
27 bool GetCookieDomainWithString(const GURL& url,
28 const std::string& domain_string,
29 std::string* result);
30
31 // Returns true if a domain string represents a host-only cookie,
32 // i.e. it doesn't begin with a leading '.' character.
33 bool DomainIsHostOnly(const std::string& domain_string);
wtc 2011/11/10 19:29:29 Based on what I see in this CL, only DomainIsHostO
34
35 } // namspace cookie_utils
36 } // namespace net
37
38 #endif // NET_BASE_COOKIE_UTILS_H_
OLDNEW
« no previous file with comments | « net/base/cookie_monster_unittest.cc ('k') | net/base/cookie_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698