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

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: most unittests pass 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 static CookieStoreConfig InMemory();
23 bool restore_old_session_cookies, 25 static CookieStoreConfig InMemoryWithOptions(
24 quota::SpecialStoragePolicy* storage_policy, 26 quota::SpecialStoragePolicy* storage_policy,
25 net::CookieMonster::Delegate* cookie_monster_delegate); 27 net::CookieMonsterDelegate* cookie_delegate);
28
29 static CookieStoreConfig Persistent(const base::FilePath& path,
30 bool restore_old_session_cookies);
31 static CookieStoreConfig PersistentWithOptions(
32 const base::FilePath& path,
33 bool restore_old_session_cookies,
34 quota::SpecialStoragePolicy* storage_policy,
35 net::CookieMonsterDelegate* cookie_delegate);
36
37 ~CookieStoreConfig();
38
39 const bool in_memory;
40 const base::FilePath path;
41 const bool restore_old_session_cookies;
42 const scoped_refptr<quota::SpecialStoragePolicy> storage_policy;
43 const scoped_refptr<net::CookieMonsterDelegate> cookie_delegate;
44
45 private:
46 CookieStoreConfig(bool in_memory, const base::FilePath& path,
47 bool restore_old_session_cookies,
48 quota::SpecialStoragePolicy* storage_policy,
49 net::CookieMonsterDelegate* cookie_delegate);
50 };
51
52 CONTENT_EXPORT net::CookieStore* CreateCookieStore(
53 const CookieStoreConfig& config);
26 54
27 } // namespace content 55 } // namespace content
28 56
29 #endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_ 57 #endif // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698