summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cookie_modal_dialog.h
diff options
context:
space:
mode:
authorjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 11:29:45 +0000
committerjorlow@chromium.org <jorlow@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-17 11:29:45 +0000
commite37f934991547accccd176d1d57d733eacde21ef (patch)
tree0e80c599ed5597bf5d9217e351795439b2564985 /chrome/browser/cookie_modal_dialog.h
parent026a135063abda1ad446c049bbea1a971bf0ec4a (diff)
downloadchromium_src-e37f934991547accccd176d1d57d733eacde21ef.zip
chromium_src-e37f934991547accccd176d1d57d733eacde21ef.tar.gz
chromium_src-e37f934991547accccd176d1d57d733eacde21ef.tar.bz2
Implement CONTENT_SETTING_ASK for database. Also some cleanup of the dialog for local storage.
BUG=34628 TEST=none Review URL: http://codereview.chromium.org/605028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cookie_modal_dialog.h')
-rw-r--r--chrome/browser/cookie_modal_dialog.h31
1 files changed, 21 insertions, 10 deletions
diff --git a/chrome/browser/cookie_modal_dialog.h b/chrome/browser/cookie_modal_dialog.h
index f704bad..6410c32 100644
--- a/chrome/browser/cookie_modal_dialog.h
+++ b/chrome/browser/cookie_modal_dialog.h
@@ -20,8 +20,8 @@ class CookiePromptModalDialog : public AppModalDialog {
public:
enum DialogType {
DIALOG_TYPE_COOKIE = 0,
- DIALOG_TYPE_LOCAL_STORAGE
- // TODO(jorlow): Database
+ DIALOG_TYPE_LOCAL_STORAGE,
+ DIALOG_TYPE_DATABASE
// TODO(michaeln): AppCache
};
@@ -31,12 +31,15 @@ class CookiePromptModalDialog : public AppModalDialog {
const GURL& origin,
const std::string& cookie_line,
CookiePromptModalDialogDelegate* delegate);
- CookiePromptModalDialog(
- TabContents* tab_contents,
- const GURL& origin,
- const string16& key,
- const string16& value,
- CookiePromptModalDialogDelegate* delegate);
+ CookiePromptModalDialog(TabContents* tab_contents,
+ const GURL& origin,
+ const string16& key,
+ const string16& value,
+ CookiePromptModalDialogDelegate* delegate);
+ CookiePromptModalDialog(TabContents* tab_contents,
+ const GURL& origin,
+ const string16& database_name,
+ CookiePromptModalDialogDelegate* delegate);
virtual ~CookiePromptModalDialog() {}
static void RegisterPrefs(PrefService* prefs);
@@ -51,7 +54,11 @@ class CookiePromptModalDialog : public AppModalDialog {
const std::string& cookie_line() const { return cookie_line_; }
const string16& local_storage_key() const { return local_storage_key_; }
const string16& local_storage_value() const { return local_storage_value_; }
- CookiePromptModalDialogDelegate* GetDelegate() { return delegate_; }
+ const string16& database_name() const { return database_name_; }
+
+ // Send a response to our delegate.
+ void AllowSiteData(bool remember, bool session_expire);
+ void BlockSiteData(bool remember);
protected:
// AppModalDialog overrides.
@@ -73,8 +80,12 @@ class CookiePromptModalDialog : public AppModalDialog {
const string16 local_storage_key_;
const string16 local_storage_value_;
+ // Database name.
+ const string16 database_name_;
+
// Delegate. The caller should provide one in order to receive results
- // from this delegate.
+ // from this delegate. Any time after calling one of these methods, the
+ // delegate could be deleted
CookiePromptModalDialogDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(CookiePromptModalDialog);