Chromium Code Reviews| Index: content/public/browser/cookie_store_map.h |
| diff --git a/content/public/browser/cookie_store_map.h b/content/public/browser/cookie_store_map.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..57a2071665a164a36e7180daf4b21b8bfd2332f1 |
| --- /dev/null |
| +++ b/content/public/browser/cookie_store_map.h |
| @@ -0,0 +1,40 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |
| +#define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |
| + |
| +#include <string> |
| + |
| +#include "content/common/content_export.h" |
| + |
| +namespace net { |
| +class CookieStore; |
| +} // namespace net |
| + |
| +namespace content { |
| + |
| +// CookieStoreMap allows associating of different CookieStore objects with |
| +// different schemes. It is mainly a convenience class. |
| +class CONTENT_EXPORT CookieStoreMap { |
| + public: |
| + virtual ~CookieStoreMap() {} |
| + |
| + // Returns the CookieStore associated with |scheme|. |
| + virtual net::CookieStore* GetForScheme(const std::string& scheme) const = 0; |
|
jam
2013/07/31 17:04:02
i see that this is only called in chrome from unit
awong
2013/08/05 23:32:38
Actually, it's needed by RenderMessageFilter (like
jam
2013/08/07 06:16:32
if it's just RMF, then we can still hide it from t
awong
2013/08/08 01:23:21
We can't just return a vector of schemes because t
|
| + |
| + // Associates a |cookie_store| with the given |scheme|. Should only be called |
| + // once for any given |scheme|. |cookie_store| must be non-NULL. The |
| + // CookieStoreMap will retain the |cookie_store| object. |
| + virtual void SetForScheme(const std::string& scheme, |
| + net::CookieStore* cookie_store) = 0; |
| + |
| + // Makes a clone of the map. Useful if the map needs to be copied to another |
| + // thread. |
| + virtual CookieStoreMap* Clone() const = 0; |
|
jam
2013/07/31 17:04:02
I only see this being called from content, so this
awong
2013/08/05 23:32:38
Good point. Moved out of public API.
|
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |