OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ | 5 #ifndef IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ |
6 #define IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ | 6 #define IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ |
7 | 7 |
| 8 #include <memory> |
| 9 |
8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
9 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
10 #include "net/cookies/canonical_cookie.h" | 12 #include "net/cookies/canonical_cookie.h" |
11 | 13 |
12 namespace base { | 14 namespace base { |
13 class SequencedTaskRunner; | 15 class SequencedTaskRunner; |
14 } | 16 } |
15 | 17 |
16 namespace ios { | 18 namespace ios { |
17 class ChromeBrowserState; | 19 class ChromeBrowserState; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const CookieStoreType cookie_store_type; | 69 const CookieStoreType cookie_store_type; |
68 | 70 |
69 // Used to provide encryption hooks for the cookie store. The | 71 // Used to provide encryption hooks for the cookie store. The |
70 // CookieCryptoDelegate must outlive any cookie store created with this | 72 // CookieCryptoDelegate must outlive any cookie store created with this |
71 // config. | 73 // config. |
72 net::CookieCryptoDelegate* crypto_delegate; | 74 net::CookieCryptoDelegate* crypto_delegate; |
73 }; | 75 }; |
74 | 76 |
75 // Creates a cookie store wich is internally either a CookieMonster or a | 77 // Creates a cookie store wich is internally either a CookieMonster or a |
76 // CookieStoreIOS. | 78 // CookieStoreIOS. |
77 scoped_ptr<net::CookieStore> CreateCookieStore(const CookieStoreConfig& config); | 79 std::unique_ptr<net::CookieStore> CreateCookieStore( |
| 80 const CookieStoreConfig& config); |
78 | 81 |
79 // Returns true if the cookies should be cleared. | 82 // Returns true if the cookies should be cleared. |
80 // Current implementation returns true if the device has rebooted since the | 83 // Current implementation returns true if the device has rebooted since the |
81 // last time cookies have been cleared. | 84 // last time cookies have been cleared. |
82 bool ShouldClearSessionCookies(); | 85 bool ShouldClearSessionCookies(); |
83 | 86 |
84 // Clears the session cookies for |browser_state|. | 87 // Clears the session cookies for |browser_state|. |
85 void ClearSessionCookies(ios::ChromeBrowserState* browser_state); | 88 void ClearSessionCookies(ios::ChromeBrowserState* browser_state); |
86 | 89 |
87 } // namespace cookie_util | 90 } // namespace cookie_util |
88 | 91 |
89 #endif // IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ | 92 #endif // IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ |
OLD | NEW |