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