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

Unified Diff: chrome/browser/cookie_modal_dialog.cc

Issue 2878075: Introduce a resource identifier for content settings. (Closed)
Patch Set: updates Created 10 years, 4 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 | « chrome/browser/content_setting_bubble_model.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cookie_modal_dialog.cc
diff --git a/chrome/browser/cookie_modal_dialog.cc b/chrome/browser/cookie_modal_dialog.cc
index f8e1c0ee7832a1d433d4a468a881db5ef96df409..ce1ff5968f1f9b6f7eb7afa7e83b103205a3f251 100644
--- a/chrome/browser/cookie_modal_dialog.cc
+++ b/chrome/browser/cookie_modal_dialog.cc
@@ -86,7 +86,7 @@ CookiePromptModalDialog::~CookiePromptModalDialog() {
bool CookiePromptModalDialog::IsValid() {
ContentSetting content_setting =
host_content_settings_map_->GetContentSetting(
- origin_, CONTENT_SETTINGS_TYPE_COOKIES);
+ origin_, CONTENT_SETTINGS_TYPE_COOKIES, "");
if (content_setting != CONTENT_SETTING_ASK) {
if (content_setting == CONTENT_SETTING_ALLOW) {
AllowSiteData(false, false);
@@ -108,10 +108,11 @@ void CookiePromptModalDialog::AllowSiteData(bool remember,
// to insert for exactly this URL.
host_content_settings_map_->SetContentSetting(
HostContentSettingsMap::Pattern::FromURLNoWildcard(origin_),
- CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_DEFAULT);
+ CONTENT_SETTINGS_TYPE_COOKIES, "", CONTENT_SETTING_DEFAULT);
host_content_settings_map_->SetContentSetting(
HostContentSettingsMap::Pattern::FromURL(origin_),
CONTENT_SETTINGS_TYPE_COOKIES,
+ "",
session_expire ? CONTENT_SETTING_SESSION_ONLY : CONTENT_SETTING_ALLOW);
}
@@ -127,10 +128,10 @@ void CookiePromptModalDialog::BlockSiteData(bool remember) {
// to insert for exactly this URL.
host_content_settings_map_->SetContentSetting(
HostContentSettingsMap::Pattern::FromURLNoWildcard(origin_),
- CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_DEFAULT);
+ CONTENT_SETTINGS_TYPE_COOKIES, "", CONTENT_SETTING_DEFAULT);
host_content_settings_map_->SetContentSetting(
HostContentSettingsMap::Pattern::FromURL(origin_),
- CONTENT_SETTINGS_TYPE_COOKIES, CONTENT_SETTING_BLOCK);
+ CONTENT_SETTINGS_TYPE_COOKIES, "", CONTENT_SETTING_BLOCK);
}
if (delegate_) {
« no previous file with comments | « chrome/browser/content_setting_bubble_model.cc ('k') | chrome/browser/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698