summaryrefslogtreecommitdiffstats
path: root/chrome/browser/message_box_handler.cc
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 17:58:32 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-20 17:58:32 +0000
commit8c1ae5ec4d47638315096f54819793484383c91f (patch)
treec7749cae01663511be911c22e3928f7ef5aa8aab /chrome/browser/message_box_handler.cc
parente90eca1550812bb5694c9523ffc75963c845d46d (diff)
downloadchromium_src-8c1ae5ec4d47638315096f54819793484383c91f.zip
chromium_src-8c1ae5ec4d47638315096f54819793484383c91f.tar.gz
chromium_src-8c1ae5ec4d47638315096f54819793484383c91f.tar.bz2
Pass in the HostContentSettingsMap to the CookieModalDialog so IsValid can make its decision. Before, it used the TabContents to get the profile to get the map, but this was incorrect because the current tab isn't necessarily from the same profile as the original request.
As long as we have the HostContentSettingsMap, we might as well handle "remember" in CookieModalDialog. This bug exists in 4.1. TEST=none BUG=none Review URL: http://codereview.chromium.org/651023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/message_box_handler.cc')
-rw-r--r--chrome/browser/message_box_handler.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/browser/message_box_handler.cc b/chrome/browser/message_box_handler.cc
index df4820f..6b9fa93 100644
--- a/chrome/browser/message_box_handler.cc
+++ b/chrome/browser/message_box_handler.cc
@@ -60,31 +60,36 @@ void RunBeforeUnloadDialog(TabContents* tab_contents,
#if defined(OS_WIN)
void RunCookiePrompt(TabContents* tab_contents,
+ HostContentSettingsMap* host_content_settings_map,
const GURL& origin,
const std::string& cookie_line,
CookiePromptModalDialogDelegate* delegate) {
Singleton<AppModalDialogQueue>()->AddDialog(
- new CookiePromptModalDialog(tab_contents, origin, cookie_line, delegate));
+ new CookiePromptModalDialog(tab_contents, host_content_settings_map,
+ origin, cookie_line, delegate));
}
void RunLocalStoragePrompt(
TabContents* tab_contents,
+ HostContentSettingsMap* host_content_settings_map,
const GURL& origin,
const string16& key,
const string16& value,
CookiePromptModalDialogDelegate* delegate) {
Singleton<AppModalDialogQueue>()->AddDialog(
- new CookiePromptModalDialog(tab_contents, origin, key, value, delegate));
+ new CookiePromptModalDialog(tab_contents, host_content_settings_map,
+ origin, key, value, delegate));
}
void RunDatabasePrompt(
TabContents* tab_contents,
+ HostContentSettingsMap* host_content_settings_map,
const GURL& origin,
const string16& database_name,
CookiePromptModalDialogDelegate* delegate) {
Singleton<AppModalDialogQueue>()->AddDialog(
- new CookiePromptModalDialog(tab_contents, origin, database_name,
- delegate));
+ new CookiePromptModalDialog(tab_contents, host_content_settings_map,
+ origin, database_name, delegate));
}
#endif