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

Side by Side Diff: chrome/browser/net/sqlite_persistent_cookie_store.h

Issue 5430004: Refactored cookies persistent store clean-up on shutdown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Lock protected the clear on exit flag. Created 10 years 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
OLDNEW
1 // Copyright (c) 2010 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 #pragma once 9 #pragma once
10 10
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/ref_counted.h" 14 #include "base/ref_counted.h"
15 #include "net/base/cookie_monster.h" 15 #include "net/base/cookie_monster.h"
16 16
17 class FilePath; 17 class FilePath;
18 18
19 // Implements the PersistentCookieStore interface in terms of a SQLite database.
20 // For documentation about the actual member functions consult the documentation
21 // of the parent class |net::CookieMonster::PersistentCookieStore|.
19 class SQLitePersistentCookieStore 22 class SQLitePersistentCookieStore
20 : public net::CookieMonster::PersistentCookieStore { 23 : public net::CookieMonster::PersistentCookieStore {
21 public: 24 public:
22 explicit SQLitePersistentCookieStore(const FilePath& path); 25 explicit SQLitePersistentCookieStore(const FilePath& path);
23 virtual ~SQLitePersistentCookieStore(); 26 virtual ~SQLitePersistentCookieStore();
24 27
25 virtual bool Load(std::vector<net::CookieMonster::CanonicalCookie*>*); 28 virtual bool Load(std::vector<net::CookieMonster::CanonicalCookie*>* cookies);
26 29
27 virtual void AddCookie(const net::CookieMonster::CanonicalCookie&); 30 virtual void AddCookie(const net::CookieMonster::CanonicalCookie& cc);
28 virtual void UpdateCookieAccessTime( 31 virtual void UpdateCookieAccessTime(
29 const net::CookieMonster::CanonicalCookie&); 32 const net::CookieMonster::CanonicalCookie& cc);
30 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie&); 33 virtual void DeleteCookie(const net::CookieMonster::CanonicalCookie& cc);
31 34
32 static void ClearLocalState(const FilePath& path); 35 virtual void SetClearLocalStateOnExit(bool clear_local_state);
33 36
34 private: 37 private:
35 class Backend; 38 class Backend;
36 39
37 scoped_refptr<Backend> backend_; 40 scoped_refptr<Backend> backend_;
38 41
39 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore); 42 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);
40 }; 43 };
41 44
42 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ 45 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_
OLDNEW
« no previous file with comments | « chrome/browser/net/chrome_url_request_context.cc ('k') | chrome/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698