Chromium Code Reviews| 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_BROWSER_NET_COOKIE_STORE_MAP_IMPL_H_ | |
| 6 #define CONTENT_BROWSER_NET_COOKIE_STORE_MAP_IMPL_H_ | |
| 7 | |
| 8 #include <map> | |
| 9 | |
| 10 #include "base/callback_forward.h" | |
| 11 #include "base/compiler_specific.h" | |
| 12 #include "base/memory/ref_counted.h" | |
| 13 #include "base/time/time.h" | |
| 14 #include "content/public/browser/cookie_store_map.h" | |
| 15 | |
| 16 class GURL; | |
| 17 | |
| 18 namespace content { | |
| 19 | |
| 20 class CookieStoreMapImpl : public CookieStoreMap { | |
| 21 public: | |
| 22 CookieStoreMapImpl(); | |
| 23 virtual ~CookieStoreMapImpl(); | |
| 24 | |
| 25 // CookieStoreMap overrides: | |
| 26 virtual net::CookieStore* GetForScheme( | |
| 27 const std::string& scheme) const OVERRIDE; | |
| 28 virtual void SetForScheme(const std::string& scheme, | |
| 29 net::CookieStore* cookie_store) OVERRIDE; | |
| 30 | |
| 31 // Clears cookies matching the specified parameters from all CookieStores | |
| 32 // contained in this map. Call |done| all CookieStores have been cleared. | |
|
Matt Perry
2013/08/07 21:48:56
Calls* |done| when* all...
awong
2013/08/16 00:54:54
Done.
| |
| 33 // |done| is guaranteed to be run on the calling thread. | |
| 34 void DeleteCookies(const GURL& origin, | |
| 35 const base::Time begin, | |
| 36 const base::Time end, | |
| 37 const base::Closure& done); | |
| 38 | |
| 39 // Makes a clone of the map. Useful if the map needs to be copied to another | |
| 40 // thread. | |
| 41 CookieStoreMapImpl* Clone() const; | |
| 42 | |
| 43 private: | |
| 44 typedef std::map<std::string, scoped_refptr<net::CookieStore> > MapType; | |
| 45 MapType scheme_map_; | |
| 46 | |
| 47 DISALLOW_COPY_AND_ASSIGN(CookieStoreMapImpl); | |
| 48 }; | |
| 49 | |
| 50 } // namespace content | |
| 51 | |
| 52 #endif // CONTENT_BROWSER_NET_COOKIE_STORE_MAP_IMPL_H_ | |
| OLD | NEW |