Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: chrome/common/net/cookie_monster_sqlite.h

Issue 201099: Convert the sqlite cookie database and web database to use the new sqlite... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/net/cookie_monster_sqlite.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // A sqlite implementation of a cookie monster persistent store.
6
7 #ifndef CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__
8 #define CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__
9
10 #include <string>
11 #include <vector>
12
13 #include "base/ref_counted.h"
14 #include "chrome/browser/meta_table_helper.h"
15 #include "net/base/cookie_monster.h"
16
17 struct sqlite3;
18
19 class MessageLoop;
20
21 class SQLitePersistentCookieStore
22 : public net::CookieMonster::PersistentCookieStore {
23 public:
24 SQLitePersistentCookieStore(const std::wstring& path,
25 MessageLoop* background_loop);
26 ~SQLitePersistentCookieStore();
27
28 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*);
29
30 virtual void AddCookie(const std::string&,
31 const net::CookieMonster::CanonicalCookie&);
32 virtual void UpdateCookieAccessTime(
33 const net::CookieMonster::CanonicalCookie&);
34 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&);
35
36 private:
37 class Backend;
38
39 // Database upgrade statements.
40 bool EnsureDatabaseVersion(sqlite3* db);
41
42 std::wstring path_;
43 scoped_refptr<Backend> backend_;
44
45 // Background MessageLoop on which to access the backend_;
46 MessageLoop* background_loop_;
47
48 MetaTableHelper meta_table_;
49
50 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);
51 };
52
53 #endif // CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/net/cookie_monster_sqlite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698