OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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 CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/common/content_export.h" |
| 11 |
| 12 namespace net { |
| 13 class CookieStore; |
| 14 } // namespace net |
| 15 |
| 16 namespace content { |
| 17 |
| 18 // CookieStoreMap allows associating of different CookieStore objects with |
| 19 // different schemes. It is mainly a convenience class. |
| 20 class CONTENT_EXPORT CookieStoreMap { |
| 21 public: |
| 22 virtual ~CookieStoreMap() {} |
| 23 |
| 24 // Returns the CookieStore associated with |scheme|. |
| 25 virtual net::CookieStore* GetForScheme(const std::string& scheme) const = 0; |
| 26 |
| 27 // Associates a |cookie_store| with the given |scheme|. Should only be called |
| 28 // once for any given |scheme|. |cookie_store| must be non-NULL. The |
| 29 // CookieStoreMap will retain the |cookie_store| object. |
| 30 virtual void SetForScheme(const std::string& scheme, |
| 31 net::CookieStore* cookie_store) = 0; |
| 32 }; |
| 33 |
| 34 } // namespace content |
| 35 |
| 36 #endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |
OLD | NEW |