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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 2502743003: Allow getting both reading/setting cookie settings at one time (Closed)
Patch Set: rdevlin review Created 4 years, 1 month 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: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 3543941d9eca0e4546107858f5126443ec145019..a521adfe9ee241aef8e779abd73fea7589fb2554 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -550,10 +550,11 @@ bool ChromeNetworkDelegate::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 reading_cookie_allowed = false;
+ bool setting_cookie_allowed = false;
+ cookie_settings_->GetReadingAndSettingCookieAllowed(
+ url, first_party_for_cookies, &reading_cookie_allowed,
+ &setting_cookie_allowed);
bool privacy_mode = !(reading_cookie_allowed && setting_cookie_allowed);
return privacy_mode;
}

Powered by Google App Engine
This is Rietveld 408576698