cookie_store_factory.h revision 0f1bc08d4cfcc34181b0b5cbf065c40f687bf740
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
3// found in the LICENSE file.
4
5#ifndef CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
6#define CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
7
8#include "content/common/content_export.h"
9#include "net/cookies/cookie_monster.h"
10
11namespace base {
12class FilePath;
13}
14
15namespace quota {
16class SpecialStoragePolicy;
17}
18
19namespace content {
20
21// All blocking database accesses will be performed on |background_task_runner|.
22// Callbacks for data load events will be performed on |client_task_runner|.
23CONTENT_EXPORT net::CookieStore* CreatePersistentCookieStore(
24    const base::FilePath& path,
25    bool restore_old_session_cookies,
26    quota::SpecialStoragePolicy* storage_policy,
27    net::CookieMonster::Delegate* cookie_monster_delegate,
28    const scoped_refptr<base::SequencedTaskRunner>& client_task_runner,
29    const scoped_refptr<base::SequencedTaskRunner>& background_task_runner);
30
31// Uses the default client_task_runner and background_task_runner.
32CONTENT_EXPORT net::CookieStore* CreatePersistentCookieStore(
33    const base::FilePath& path,
34    bool restore_old_session_cookies,
35    quota::SpecialStoragePolicy* storage_policy,
36    net::CookieMonster::Delegate* cookie_monster_delegate);
37
38}  // namespace content
39
40#endif  // CONTENT_PUBLIC_BROWSER_COOKIE_STORE_FACTORY_H_
41