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

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

Issue 99100: Update cookie expiry policy to attempt to avoid deleting "in-use" cookies. S... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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 | « no previous file | 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
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 "chrome/browser/meta_table_helper.h" 14 #include "chrome/browser/meta_table_helper.h"
15 #include "net/base/cookie_monster.h" 15 #include "net/base/cookie_monster.h"
16 16
17 struct sqlite3; 17 struct sqlite3;
18 18
19 class MessageLoop; 19 class MessageLoop;
20 20
21 class SQLitePersistentCookieStore 21 class SQLitePersistentCookieStore
22 : public net::CookieMonster::PersistentCookieStore { 22 : public net::CookieMonster::PersistentCookieStore {
23 public: 23 public:
24 SQLitePersistentCookieStore(const std::wstring& path, 24 SQLitePersistentCookieStore(const std::wstring& path,
25 MessageLoop* background_loop); 25 MessageLoop* background_loop);
26 ~SQLitePersistentCookieStore(); 26 ~SQLitePersistentCookieStore();
27 27
28 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*); 28 virtual bool Load(std::vector<net::CookieMonster::KeyedCanonicalCookie>*,
29 base::Time*);
29 30
30 virtual void AddCookie(const std::string&, 31 virtual void AddCookie(const std::string&,
31 const net::CookieMonster::CanonicalCookie&); 32 const net::CookieMonster::CanonicalCookie&);
32 virtual void UpdateCookieAccessTime( 33 virtual void UpdateCookieAccessTime(
33 const net::CookieMonster::CanonicalCookie&); 34 const net::CookieMonster::CanonicalCookie&);
34 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); 35 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&);
35 36
36 private: 37 private:
37 class Backend; 38 class Backend;
38 39
39 // Database upgrade statements. 40 // Database upgrade statements.
40 bool EnsureDatabaseVersion(sqlite3* db); 41 bool EnsureDatabaseVersion(sqlite3* db);
41 42
42 std::wstring path_; 43 std::wstring path_;
43 scoped_refptr<Backend> backend_; 44 scoped_refptr<Backend> backend_;
44 45
45 // Background MessageLoop on which to access the backend_; 46 // Background MessageLoop on which to access the backend_;
46 MessageLoop* background_loop_; 47 MessageLoop* background_loop_;
47 48
48 MetaTableHelper meta_table_; 49 MetaTableHelper meta_table_;
49 50
50 DISALLOW_EVIL_CONSTRUCTORS(SQLitePersistentCookieStore); 51 DISALLOW_EVIL_CONSTRUCTORS(SQLitePersistentCookieStore);
51 }; 52 };
52 53
53 #endif // CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__ 54 #endif // CHROME_COMMON_NET_COOKIE_MONSTER_SQLITE_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/common/net/cookie_monster_sqlite.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698