OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // A sqlite implementation of a cookie monster persistent store. | 5 // A sqlite implementation of a cookie monster persistent store. |
6 | 6 |
7 #ifndef CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ | 7 #ifndef CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ |
8 #define CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ | 8 #define CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
(...skipping 13 matching lines...) Expand all Loading... |
25 ~SQLitePersistentCookieStore(); | 25 ~SQLitePersistentCookieStore(); |
26 | 26 |
27 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); | 27 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); |
28 | 28 |
29 virtual void AddCookie(const std::string&, | 29 virtual void AddCookie(const std::string&, |
30 const net::CookieMonster::CanonicalCookie&); | 30 const net::CookieMonster::CanonicalCookie&); |
31 virtual void UpdateCookieAccessTime( | 31 virtual void UpdateCookieAccessTime( |
32 const net::CookieMonster::CanonicalCookie&); | 32 const net::CookieMonster::CanonicalCookie&); |
33 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); | 33 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); |
34 | 34 |
| 35 static void ClearLocalState(const FilePath& path); |
| 36 |
35 private: | 37 private: |
36 class Backend; | 38 class Backend; |
37 | 39 |
38 // Database upgrade statements. | 40 // Database upgrade statements. |
39 bool EnsureDatabaseVersion(sql::Connection* db); | 41 bool EnsureDatabaseVersion(sql::Connection* db); |
40 | 42 |
41 FilePath path_; | 43 FilePath path_; |
42 scoped_refptr<Backend> backend_; | 44 scoped_refptr<Backend> backend_; |
43 | 45 |
44 sql::MetaTable meta_table_; | 46 sql::MetaTable meta_table_; |
45 | 47 |
46 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore); | 48 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore); |
47 }; | 49 }; |
48 | 50 |
49 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ | 51 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ |
OLD | NEW |