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

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

Issue 9703011: Move the cookie store implementation into its own directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: net/base/cookies/ -> net/cookies/ Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/cookie_store_unittest.h ('k') | net/base/cookie_util.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 // Provides a temporary redirection while clients are updated to use the new
6 // path.
7
5 #ifndef NET_BASE_COOKIE_UTIL_H_ 8 #ifndef NET_BASE_COOKIE_UTIL_H_
6 #define NET_BASE_COOKIE_UTIL_H_ 9 #define NET_BASE_COOKIE_UTIL_H_
7 #pragma once 10 #pragma once
8 11
9 #include <string> 12 #include "net/cookies/cookie_util.h"
10
11 #include "net/base/net_export.h"
12
13 class GURL;
14
15 namespace net {
16 namespace cookie_util {
17
18 // Returns the effective TLD+1 for a given host. This only makes sense for http
19 // and https schemes. For other schemes, the host will be returned unchanged
20 // (minus any leading period).
21 NET_EXPORT std::string GetEffectiveDomain(const std::string& scheme,
22 const std::string& host);
23
24 // Determine the actual cookie domain based on the domain string passed
25 // (if any) and the URL from which the cookie came.
26 // On success returns true, and sets cookie_domain to either a
27 // -host cookie domain (ex: "google.com")
28 // -domain cookie domain (ex: ".google.com")
29 NET_EXPORT bool GetCookieDomainWithString(const GURL& url,
30 const std::string& domain_string,
31 std::string* result);
32
33 // Returns true if a domain string represents a host-only cookie,
34 // i.e. it doesn't begin with a leading '.' character.
35 NET_EXPORT bool DomainIsHostOnly(const std::string& domain_string);
36
37 } // namspace cookie_util
38 } // namespace net
39 13
40 #endif // NET_BASE_COOKIE_UTIL_H_ 14 #endif // NET_BASE_COOKIE_UTIL_H_
OLDNEW
« no previous file with comments | « net/base/cookie_store_unittest.h ('k') | net/base/cookie_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698