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

Side by Side Diff: content/public/browser/cookie_store_factory.h

Issue 12546016: Remove the Extensions URLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile gdi. Created 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
6 #define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ 6 #define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
7 7
8 #include "base/memory/ref_counted.h"
8 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
9 #include "net/cookies/cookie_monster.h" 10 #include "net/cookies/cookie_monster.h"
11 #include "webkit/browser/quota/special_storage_policy.h"
10 12
11 namespace base { 13 namespace base {
12 class FilePath; 14 class FilePath;
13 } 15 }
14 16
15 namespace quota { 17 namespace net {
16 class SpecialStoragePolicy; 18 class CookieStore;
17 } 19 }
18 20
19 namespace content { 21 namespace content {
20 22
21 CONTENT_EXPORT net::CookieStore* CreatePersistentCookieStore( 23 struct CONTENT_EXPORT CookieStoreConfig {
22 const base::FilePath& path, 24 // Specifies how Session Cookies are persisted.
23 bool restore_old_session_cookies, 25 enum SessionCookieMode {
24 quota::SpecialStoragePolicy* storage_policy, 26 EPHEMERAL_SESSION_COOKIES,
25 net::CookieMonster::Delegate* cookie_monster_delegate); 27 PERSISTANT_SESSION_COOKIES,
28 RESTORED_SESSION_COOKIES
29 };
30
31 static CookieStoreConfig InMemory();
32 static CookieStoreConfig InMemoryWithOptions(
33 quota::SpecialStoragePolicy* storage_policy,
34 net::CookieMonsterDelegate* cookie_delegate);
35
36 static CookieStoreConfig Persistent(const base::FilePath& path,
37 SessionCookieMode session_cookie_mode);
38 static CookieStoreConfig PersistentWithOptions(
39 const base::FilePath& path,
40 SessionCookieMode session_cookie_mode,
41 quota::SpecialStoragePolicy* storage_policy,
42 net::CookieMonsterDelegate* cookie_delegate);
43
44 ~CookieStoreConfig();
45
46 const bool in_memory;
47 const base::FilePath path;
48 const SessionCookieMode session_cookie_mode;
49 const scoped_refptr<quota::SpecialStoragePolicy> storage_policy;
50 const scoped_refptr<net::CookieMonsterDelegate> cookie_delegate;
51
52 private:
53 CookieStoreConfig(bool in_memory, const base::FilePath& path,
54 SessionCookieMode session_cookie_mode,
55 quota::SpecialStoragePolicy* storage_policy,
56 net::CookieMonsterDelegate* cookie_delegate);
57 };
58
59 CONTENT_EXPORT net::CookieStore* CreateCookieStore(
60 const CookieStoreConfig& config);
26 61
27 } // namespace content 62 } // namespace content
28 63
29 #endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ 64 #endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698