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

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

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ 7 #ifndef CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_
8 #define CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ 8 #define CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_
9 9
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/callback_forward.h" 13 #include "base/callback_forward.h"
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/memory/ref_counted.h" 15 #include "base/memory/ref_counted.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "net/cookies/cookie_monster.h" 17 #include "net/cookies/cookie_monster.h"
18 18
19 class Task; 19 class Task;
20 20
21 namespace base { 21 namespace base {
22 class FilePath; 22 class FilePath;
23 class SequencedTaskRunner; 23 class SequencedTaskRunner;
24 } 24 }
25 25
26 namespace net { 26 namespace net {
27 class CanonicalCookie; 27 class CanonicalCookie;
28 } 28 }
29 29
30 namespace quota { 30 namespace storage {
31 class SpecialStoragePolicy; 31 class SpecialStoragePolicy;
32 } 32 }
33 33
34 namespace content { 34 namespace content {
35 class CookieCryptoDelegate; 35 class CookieCryptoDelegate;
36 36
37 // Implements the PersistentCookieStore interface in terms of a SQLite database. 37 // Implements the PersistentCookieStore interface in terms of a SQLite database.
38 // For documentation about the actual member functions consult the documentation 38 // For documentation about the actual member functions consult the documentation
39 // of the parent class |net::CookieMonster::PersistentCookieStore|. 39 // of the parent class |net::CookieMonster::PersistentCookieStore|.
40 // If provided, a |SpecialStoragePolicy| is consulted when the SQLite database 40 // If provided, a |SpecialStoragePolicy| is consulted when the SQLite database
41 // is closed to decide which cookies to keep. 41 // is closed to decide which cookies to keep.
42 class CONTENT_EXPORT SQLitePersistentCookieStore 42 class CONTENT_EXPORT SQLitePersistentCookieStore
43 : public net::CookieMonster::PersistentCookieStore { 43 : public net::CookieMonster::PersistentCookieStore {
44 public: 44 public:
45 // All blocking database accesses will be performed on 45 // All blocking database accesses will be performed on
46 // |background_task_runner|, while |client_task_runner| is used to invoke 46 // |background_task_runner|, while |client_task_runner| is used to invoke
47 // callbacks. 47 // callbacks.
48 SQLitePersistentCookieStore( 48 SQLitePersistentCookieStore(
49 const base::FilePath& path, 49 const base::FilePath& path,
50 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner, 50 const scoped_refptr<base::SequencedTaskRunner>& client_task_runner,
51 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner, 51 const scoped_refptr<base::SequencedTaskRunner>& background_task_runner,
52 bool restore_old_session_cookies, 52 bool restore_old_session_cookies,
53 quota::SpecialStoragePolicy* special_storage_policy, 53 storage::SpecialStoragePolicy* special_storage_policy,
54 CookieCryptoDelegate* crypto_delegate); 54 CookieCryptoDelegate* crypto_delegate);
55 55
56 // net::CookieMonster::PersistentCookieStore: 56 // net::CookieMonster::PersistentCookieStore:
57 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE; 57 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE;
58 virtual void LoadCookiesForKey(const std::string& key, 58 virtual void LoadCookiesForKey(const std::string& key,
59 const LoadedCallback& callback) OVERRIDE; 59 const LoadedCallback& callback) OVERRIDE;
60 virtual void AddCookie(const net::CanonicalCookie& cc) OVERRIDE; 60 virtual void AddCookie(const net::CanonicalCookie& cc) OVERRIDE;
61 virtual void UpdateCookieAccessTime(const net::CanonicalCookie& cc) OVERRIDE; 61 virtual void UpdateCookieAccessTime(const net::CanonicalCookie& cc) OVERRIDE;
62 virtual void DeleteCookie(const net::CanonicalCookie& cc) OVERRIDE; 62 virtual void DeleteCookie(const net::CanonicalCookie& cc) OVERRIDE;
63 virtual void SetForceKeepSessionState() OVERRIDE; 63 virtual void SetForceKeepSessionState() OVERRIDE;
64 virtual void Flush(const base::Closure& callback) OVERRIDE; 64 virtual void Flush(const base::Closure& callback) OVERRIDE;
65 65
66 protected: 66 protected:
67 virtual ~SQLitePersistentCookieStore(); 67 virtual ~SQLitePersistentCookieStore();
68 68
69 private: 69 private:
70 class Backend; 70 class Backend;
71 71
72 scoped_refptr<Backend> backend_; 72 scoped_refptr<Backend> backend_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore); 74 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);
75 }; 75 };
76 76
77 } // namespace content 77 } // namespace content
78 78
79 #endif // CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ 79 #endif // CONTENT_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_
OLDNEW
« no previous file with comments | « content/browser/media/webrtc_identity_store_backend.cc ('k') | content/browser/net/sqlite_persistent_cookie_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698