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

Unified Diff: ios/chrome/browser/net/ios_chrome_network_delegate.cc

Issue 2655443003: Unify the "get" and "set" cookie access settings. (Closed)
Patch Set: fix android Created 3 years, 11 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
Index: ios/chrome/browser/net/ios_chrome_network_delegate.cc
diff --git a/ios/chrome/browser/net/ios_chrome_network_delegate.cc b/ios/chrome/browser/net/ios_chrome_network_delegate.cc
index c1d29d68a53df3104535b62ae41cc59f34421a9b..85a4b0da2cf04c8d1762599fe38c4e8afd5cc4af 100644
--- a/ios/chrome/browser/net/ios_chrome_network_delegate.cc
+++ b/ios/chrome/browser/net/ios_chrome_network_delegate.cc
@@ -129,7 +129,7 @@ bool IOSChromeNetworkDelegate::OnCanGetCookies(
if (!cookie_settings_)
return true;
- return cookie_settings_->IsReadingCookieAllowed(
+ return cookie_settings_->IsCookieAccessAllowed(
request.url(), request.first_party_for_cookies());
}
@@ -140,7 +140,7 @@ bool IOSChromeNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
if (!cookie_settings_)
return true;
- return cookie_settings_->IsSettingCookieAllowed(
+ return cookie_settings_->IsCookieAccessAllowed(
request.url(), request.first_party_for_cookies());
}
@@ -157,12 +157,7 @@ bool IOSChromeNetworkDelegate::OnCanEnablePrivacyMode(
if (!cookie_settings_.get())
return false;
- bool reading_cookie_allowed =
- cookie_settings_->IsReadingCookieAllowed(url, first_party_for_cookies);
- bool setting_cookie_allowed =
- cookie_settings_->IsSettingCookieAllowed(url, first_party_for_cookies);
- bool privacy_mode = !(reading_cookie_allowed && setting_cookie_allowed);
- return privacy_mode;
+ return !cookie_settings_->IsCookieAccessAllowed(url, first_party_for_cookies);
}
bool IOSChromeNetworkDelegate::

Powered by Google App Engine
This is Rietveld 408576698