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..b76c1bb816addc575b5ce385d25e0e053f1953c6 |
--- /dev/null |
+++ b/content/public/browser/cookie_store_map.h |
@@ -0,0 +1,36 @@ |
+// 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; |
+ |
+ // 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; |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_MAP_H_ |