summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cookie_modal_dialog.h
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 03:51:50 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-18 03:51:50 +0000
commit1e1baa489c6fc202c8516707dd5ca2d4738920b9 (patch)
tree060270c7656e935cfdb0aaa1cea4d48cc8626611 /chrome/browser/cookie_modal_dialog.h
parentc1f50aa589d83b9725d4b7f19559eb94c006d818 (diff)
downloadchromium_src-1e1baa489c6fc202c8516707dd5ca2d4738920b9.zip
chromium_src-1e1baa489c6fc202c8516707dd5ca2d4738920b9.tar.gz
chromium_src-1e1baa489c6fc202c8516707dd5ca2d4738920b9.tar.bz2
Fixes two bugs in cookie prompting:
. In certain situations we could crash because we weren't letting CookiePromptView::Init complete and then attempting to reference some NULL fields. I've fixed this by adding AppModalDialog::IsValid and moving the logic that was in Init to IsValid. This way we only create CookiePromptView when needed. . We were leaking AppModalDialogs. I've made CookiePromptView own the AppModalDialog and delete it when the CookiePromptView is deleted. BUG=36079 TEST=enable prompting for cookies, go to a bunch of sites make sure you don't crash. Review URL: http://codereview.chromium.org/632006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39328 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cookie_modal_dialog.h')
-rw-r--r--chrome/browser/cookie_modal_dialog.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/cookie_modal_dialog.h b/chrome/browser/cookie_modal_dialog.h
index c5cb8bd..05ed0e2 100644
--- a/chrome/browser/cookie_modal_dialog.h
+++ b/chrome/browser/cookie_modal_dialog.h
@@ -48,6 +48,7 @@ class CookiePromptModalDialog : public AppModalDialog {
virtual int GetDialogButtons();
virtual void AcceptWindow();
virtual void CancelWindow();
+ virtual bool IsValid();
DialogType dialog_type() const { return dialog_type_; }
const GURL& origin() const { return origin_; }