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

Side by Side Diff: net/cookies/cookie_monster.h

Issue 976553002: Remove the '--enable-file-cookies' flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 8 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
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 // Brought to you by the letter D and the number 2. 5 // Brought to you by the letter D and the number 2.
6 6
7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_ 7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_
8 #define NET_COOKIES_COOKIE_MONSTER_H_ 8 #define NET_COOKIES_COOKIE_MONSTER_H_
9 9
10 #include <deque> 10 #include <deque>
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 203
204 // Checks whether for a given ETLD+1, there currently exist any cookies. 204 // Checks whether for a given ETLD+1, there currently exist any cookies.
205 void HasCookiesForETLDP1Async(const std::string& etldp1, 205 void HasCookiesForETLDP1Async(const std::string& etldp1,
206 const HasCookiesForETLDP1Callback& callback); 206 const HasCookiesForETLDP1Callback& callback);
207 207
208 // Resets the list of cookieable schemes to the supplied schemes. 208 // Resets the list of cookieable schemes to the supplied schemes.
209 // If this this method is called, it must be called before first use of 209 // If this this method is called, it must be called before first use of
210 // the instance (i.e. as part of the instance initialization process). 210 // the instance (i.e. as part of the instance initialization process).
211 void SetCookieableSchemes(const char* const schemes[], size_t num_schemes); 211 void SetCookieableSchemes(const char* const schemes[], size_t num_schemes);
212 212
213 // Resets the list of cookieable schemes to kDefaultCookieableSchemes with or
214 // without 'file' being included.
215 //
216 // There are some unknowns about how to correctly handle file:// cookies,
217 // and our implementation for this is not robust enough. This allows you
218 // to enable support, but it should only be used for testing. Bug 1157243.
219 void SetEnableFileScheme(bool accept);
220
221 // Instructs the cookie monster to not delete expired cookies. This is used 213 // Instructs the cookie monster to not delete expired cookies. This is used
222 // in cases where the cookie monster is used as a data structure to keep 214 // in cases where the cookie monster is used as a data structure to keep
223 // arbitrary cookies. 215 // arbitrary cookies.
224 void SetKeepExpiredCookies(); 216 void SetKeepExpiredCookies();
225 217
226 // Protects session cookies from deletion on shutdown. 218 // Protects session cookies from deletion on shutdown.
227 void SetForceKeepSessionState(); 219 void SetForceKeepSessionState();
228 220
229 // Flush the backing store (if any) to disk and post the given callback when 221 // Flush the backing store (if any) to disk and post the given callback when
230 // done. 222 // done.
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 297
306 // The default list of schemes the cookie monster can handle. 298 // The default list of schemes the cookie monster can handle.
307 static const char* const kDefaultCookieableSchemes[]; 299 static const char* const kDefaultCookieableSchemes[];
308 static const int kDefaultCookieableSchemesCount; 300 static const int kDefaultCookieableSchemesCount;
309 301
310 scoped_ptr<CookieChangedSubscription> AddCallbackForCookie( 302 scoped_ptr<CookieChangedSubscription> AddCallbackForCookie(
311 const GURL& url, 303 const GURL& url,
312 const std::string& name, 304 const std::string& name,
313 const CookieChangedCallback& callback) override; 305 const CookieChangedCallback& callback) override;
314 306
307 #if defined(OS_ANDROID)
308 // Resets the list of cookieable schemes to kDefaultCookieableSchemes with or
309 // without 'file' being included.
310 //
311 // There are some unknowns about how to correctly handle file:// cookies,
312 // and our implementation for this is not robust enough (Bug 1157243).
313 // This allows you to enable support, and is exposed as a public WebView
314 // API ('CookieManager::setAcceptFileSchemeCookies').
315 //
316 // TODO(mkwst): This method will be removed once we can deprecate and remove
317 // the Android WebView 'CookieManager::setAcceptFileSchemeCookies' method.
318 // Until then, this method only has effect on Android, and must not be used
319 // outside a WebView context.
320 void SetEnableFileScheme(bool accept);
321 #endif
322
315 private: 323 private:
316 // For queueing the cookie monster calls. 324 // For queueing the cookie monster calls.
317 class CookieMonsterTask; 325 class CookieMonsterTask;
318 template <typename Result> 326 template <typename Result>
319 class DeleteTask; 327 class DeleteTask;
320 class DeleteAllCreatedBetweenTask; 328 class DeleteAllCreatedBetweenTask;
321 class DeleteAllCreatedBetweenForHostTask; 329 class DeleteAllCreatedBetweenForHostTask;
322 class DeleteAllForHostTask; 330 class DeleteAllForHostTask;
323 class DeleteAllTask; 331 class DeleteAllTask;
324 class DeleteCookieTask; 332 class DeleteCookieTask;
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 virtual ~PersistentCookieStore() {} 801 virtual ~PersistentCookieStore() {}
794 802
795 private: 803 private:
796 friend class base::RefCountedThreadSafe<PersistentCookieStore>; 804 friend class base::RefCountedThreadSafe<PersistentCookieStore>;
797 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 805 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
798 }; 806 };
799 807
800 } // namespace net 808 } // namespace net
801 809
802 #endif // NET_COOKIES_COOKIE_MONSTER_H_ 810 #endif // NET_COOKIES_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698