| OLD | NEW |
| 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 number 42. | 5 // Brought to you by number 42. |
| 6 | 6 |
| 7 #ifndef NET_BASE_COOKIE_STORE_H_ | 7 #ifndef NET_BASE_COOKIE_STORE_H_ |
| 8 #define NET_BASE_COOKIE_STORE_H_ | 8 #define NET_BASE_COOKIE_STORE_H_ |
| 9 #pragma once | 9 #pragma once |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "net/base/cookie_options.h" | 17 #include "net/base/cookie_options.h" |
| 18 #include "net/base/net_api.h" |
| 18 | 19 |
| 19 class GURL; | 20 class GURL; |
| 20 | 21 |
| 21 namespace net { | 22 namespace net { |
| 22 | 23 |
| 23 class CookieMonster; | 24 class CookieMonster; |
| 24 | 25 |
| 25 // An interface for storing and retrieving cookies. Implementations need to | 26 // An interface for storing and retrieving cookies. Implementations need to |
| 26 // be thread safe as its methods can be accessed from IO as well as UI threads. | 27 // be thread safe as its methods can be accessed from IO as well as UI threads. |
| 27 class CookieStore : public base::RefCountedThreadSafe<CookieStore> { | 28 class NET_API CookieStore : public base::RefCountedThreadSafe<CookieStore> { |
| 28 public: | 29 public: |
| 29 // This struct contains additional consumer-specific information that might | 30 // This struct contains additional consumer-specific information that might |
| 30 // be stored with cookies; currently just MAC information, see: | 31 // be stored with cookies; currently just MAC information, see: |
| 31 // http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac | 32 // http://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac |
| 32 struct CookieInfo { | 33 struct NET_API CookieInfo { |
| 33 CookieInfo(); | 34 CookieInfo(); |
| 34 ~CookieInfo(); | 35 ~CookieInfo(); |
| 35 | 36 |
| 36 // The name of the cookie. | 37 // The name of the cookie. |
| 37 std::string name; | 38 std::string name; |
| 38 // TODO(abarth): Add value if any clients need it. | 39 // TODO(abarth): Add value if any clients need it. |
| 39 | 40 |
| 40 // The value of the MAC-Key and MAC-Algorithm attributes, if present. | 41 // The value of the MAC-Key and MAC-Algorithm attributes, if present. |
| 41 std::string mac_key; | 42 std::string mac_key; |
| 42 std::string mac_algorithm; | 43 std::string mac_algorithm; |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 95 |
| 95 protected: | 96 protected: |
| 96 friend class base::RefCountedThreadSafe<CookieStore>; | 97 friend class base::RefCountedThreadSafe<CookieStore>; |
| 97 CookieStore(); | 98 CookieStore(); |
| 98 virtual ~CookieStore(); | 99 virtual ~CookieStore(); |
| 99 }; | 100 }; |
| 100 | 101 |
| 101 } // namespace net | 102 } // namespace net |
| 102 | 103 |
| 103 #endif // NET_BASE_COOKIE_STORE_H_ | 104 #endif // NET_BASE_COOKIE_STORE_H_ |
| OLD | NEW |