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

Unified Diff: net/cookies/cookie_monster.cc

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, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index aa39b608b8bb5ed8db616b2ab38fe0e5e9e48047..03b3749f72e0dfb8fffc39bd0702c4a022989b62 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1340,14 +1340,6 @@ void CookieMonster::SetCookieableSchemes(const char* const schemes[],
schemes + num_schemes);
}
-void CookieMonster::SetEnableFileScheme(bool accept) {
- // This assumes "file" is always at the end of the array. See the comment
- // above kDefaultCookieableSchemes.
- int num_schemes = accept ? kDefaultCookieableSchemesCount
- : kDefaultCookieableSchemesCount - 1;
- SetCookieableSchemes(kDefaultCookieableSchemes, num_schemes);
-}
-
void CookieMonster::SetKeepExpiredCookies() {
keep_expired_cookies_ = true;
}
@@ -2350,6 +2342,23 @@ CookieMonster::AddCallbackForCookie(const GURL& gurl,
base::Bind(&RunAsync, base::MessageLoopProxy::current(), callback));
}
+#if defined(OS_ANDROID)
+void CookieMonster::SetEnableFileScheme(bool accept) {
+ // This assumes "file" is always at the end of the array. See the comment
+ // above kDefaultCookieableSchemes.
+ //
+ // TODO(mkwst): We're keeping this method around to support the
+ // 'CookieManager::setAcceptFileSchemeCookies' method on Android's WebView;
+ // if/when we can deprecate and remove that method, we can remove this one
+ // as well. Until then, we'll just ensure that the method has no effect on
+ // non-android systems.
+ int num_schemes = accept ? kDefaultCookieableSchemesCount
+ : kDefaultCookieableSchemesCount - 1;
+
+ SetCookieableSchemes(kDefaultCookieableSchemes, num_schemes);
+}
+#endif
+
void CookieMonster::RunCallbacks(const CanonicalCookie& cookie, bool removed) {
lock_.AssertAcquired();
CookieOptions opts;
« no previous file with comments | « net/cookies/cookie_monster.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698