OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ | 7 #ifndef CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ |
8 #define CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ | 8 #define CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "base/message_loop.h" | |
15 #include "chrome/browser/meta_table_helper.h" | 14 #include "chrome/browser/meta_table_helper.h" |
16 #include "net/base/cookie_monster.h" | 15 #include "net/base/cookie_monster.h" |
17 | 16 |
18 struct sqlite3; | 17 struct sqlite3; |
19 | 18 |
| 19 class MessageLoop; |
| 20 |
20 class SQLitePersistentCookieStore | 21 class SQLitePersistentCookieStore |
21 : public net::CookieMonster::PersistentCookieStore { | 22 : public net::CookieMonster::PersistentCookieStore { |
22 public: | 23 public: |
23 SQLitePersistentCookieStore(const std::wstring& path, | 24 SQLitePersistentCookieStore(const std::wstring& path, |
24 MessageLoop* background_loop); | 25 MessageLoop* background_loop); |
25 ~SQLitePersistentCookieStore(); | 26 ~SQLitePersistentCookieStore(); |
26 | 27 |
27 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); | 28 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); |
28 | 29 |
29 virtual void AddCookie(const std::string&, | 30 virtual void AddCookie(const std::string&, |
(...skipping 13 matching lines...) Expand all Loading... |
43 | 44 |
44 // Background MessageLoop on which to access the backend_; | 45 // Background MessageLoop on which to access the backend_; |
45 MessageLoop* background_loop_; | 46 MessageLoop* background_loop_; |
46 | 47 |
47 MetaTableHelper meta_table_; | 48 MetaTableHelper meta_table_; |
48 | 49 |
49 DISALLOW_EVIL_CONSTRUCTORS(SQLitePersistentCookieStore); | 50 DISALLOW_EVIL_CONSTRUCTORS(SQLitePersistentCookieStore); |
50 }; | 51 }; |
51 | 52 |
52 #endif // CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ | 53 #endif // CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ |
OLD | NEW |