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 |
noyau (Ping after 24h)
2016/04/07 13:34:04
#include <memory>
| |
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" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class SequencedTaskRunner; | 13 class SequencedTaskRunner; |
14 } | 14 } |
15 | 15 |
16 namespace ios { | 16 namespace ios { |
17 class ChromeBrowserState; | 17 class ChromeBrowserState; |
(...skipping 49 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 scoped_ptr<net::CookieStore> CreateCookieStore(const CookieStoreConfig& config); | 77 std::unique_ptr<net::CookieStore> CreateCookieStore( |
78 const CookieStoreConfig& config); | |
78 | 79 |
79 // Returns true if the cookies should be cleared. | 80 // Returns true if the cookies should be cleared. |
80 // Current implementation returns true if the device has rebooted since the | 81 // Current implementation returns true if the device has rebooted since the |
81 // last time cookies have been cleared. | 82 // last time cookies have been cleared. |
82 bool ShouldClearSessionCookies(); | 83 bool ShouldClearSessionCookies(); |
83 | 84 |
84 // Clears the session cookies for |browser_state|. | 85 // Clears the session cookies for |browser_state|. |
85 void ClearSessionCookies(ios::ChromeBrowserState* browser_state); | 86 void ClearSessionCookies(ios::ChromeBrowserState* browser_state); |
86 | 87 |
87 } // namespace cookie_util | 88 } // namespace cookie_util |
88 | 89 |
89 #endif // IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ | 90 #endif // IOS_CHROME_BROWSER_NET_COOKIE_UTIL_H_ |
OLD | NEW |