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

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

Issue 7864008: Split initial load of cookies by domains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
erikwright (departed) 2011/09/17 02:22:10 #include "base/compiler_specific.h" for OVERRIDE
guohui 2011/09/20 18:34:46 Done.
15 #include "net/base/cookie_monster.h" 15 #include "net/base/cookie_monster.h"
16 16
17 class FilePath; 17 class FilePath;
erikwright (departed) 2011/09/17 02:22:10 forward declare "class Task;"
guohui 2011/09/20 18:34:46 Done.
18 18
19 // Implements the PersistentCookieStore interface in terms of a SQLite database. 19 // Implements the PersistentCookieStore interface in terms of a SQLite database.
20 // For documentation about the actual member functions consult the documentation 20 // For documentation about the actual member functions consult the documentation
21 // of the parent class |net::CookieMonster::PersistentCookieStore|. 21 // of the parent class |net::CookieMonster::PersistentCookieStore|.
22 class SQLitePersistentCookieStore 22 class SQLitePersistentCookieStore
23 : public net::CookieMonster::PersistentCookieStore { 23 : public net::CookieMonster::PersistentCookieStore {
24 public: 24 public:
25 explicit SQLitePersistentCookieStore(const FilePath& path); 25 explicit SQLitePersistentCookieStore(const FilePath& path);
26 virtual ~SQLitePersistentCookieStore(); 26 virtual ~SQLitePersistentCookieStore();
27 27
28 virtual bool Load(const LoadedCallback& loaded_callback) OVERRIDE; 28 virtual void Load(const LoadedCallback& loaded_callback) OVERRIDE;
29
30 virtual void LoadCookiesForKey(const std::string& key,
31 const LoadedCallback& callback) OVERRIDE;
29 32
30 virtual void AddCookie( 33 virtual void AddCookie(
31 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE; 34 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE;
32 35
33 virtual void UpdateCookieAccessTime( 36 virtual void UpdateCookieAccessTime(
34 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE; 37 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE;
35 38
36 virtual void DeleteCookie( 39 virtual void DeleteCookie(
37 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE; 40 const net::CookieMonster::CanonicalCookie& cc) OVERRIDE;
38 41
39 virtual void SetClearLocalStateOnExit(bool clear_local_state) OVERRIDE; 42 virtual void SetClearLocalStateOnExit(bool clear_local_state) OVERRIDE;
40 43
41 virtual void Flush(Task* completion_task) OVERRIDE; 44 virtual void Flush(Task* completion_task) OVERRIDE;
42 45
43 private: 46 private:
44 class Backend; 47 class Backend;
45 48
46 scoped_refptr<Backend> backend_; 49 scoped_refptr<Backend> backend_;
47 50
48 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore); 51 DISALLOW_COPY_AND_ASSIGN(SQLitePersistentCookieStore);
49 }; 52 };
50 53
51 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_ 54 #endif // CHROME_BROWSER_NET_SQLITE_PERSISTENT_COOKIE_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698