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

Unified Diff: chrome/browser/cookie_modal_dialog.h

Issue 597061: Make the setItem CONTENT_SETTING_ASK dialog more useful by showing the actual... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 10 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
Index: chrome/browser/cookie_modal_dialog.h
===================================================================
--- chrome/browser/cookie_modal_dialog.h (revision 38896)
+++ chrome/browser/cookie_modal_dialog.h (working copy)
@@ -18,6 +18,13 @@
// |NativeDialog| is a platform specific view.
class CookiePromptModalDialog : public AppModalDialog {
public:
+ enum DialogType {
+ DIALOG_TYPE_COOKIE=0,
darin (slow to review) 2010/02/12 20:55:52 _COOKIE = 0 <-- whitespace
jorlow 2010/02/12 21:22:42 Doing...
+ DIALOG_TYPE_LOCAL_STORAGE
+ // TODO(jorlow): Database
+ // TODO(michaeln): AppCache
+ };
+
// A union of data necessary to determine the type of message box to
// show.
CookiePromptModalDialog(TabContents* tab_contents,
@@ -26,7 +33,9 @@
CookiePromptModalDialogDelegate* delegate);
CookiePromptModalDialog(
TabContents* tab_contents,
- const BrowsingDataLocalStorageHelper::LocalStorageInfo& storage_info,
+ const std::string& host,
+ const string16& key,
+ const string16& value,
CookiePromptModalDialogDelegate* delegate);
virtual ~CookiePromptModalDialog() {}
@@ -37,6 +46,13 @@
virtual void AcceptWindow();
virtual void CancelWindow();
+ DialogType dialog_type() const { return dialog_type_; }
+ const std::string& host() const { return host_; }
+ 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_; }
+
protected:
// AppModalDialog overrides.
virtual NativeDialog CreateNativeDialog();
@@ -45,18 +61,18 @@
#endif
private:
- // Cookie host.
- std::string host_;
+ const DialogType dialog_type_;
+ // The host connected to this request.
+ const std::string host_;
+
// Cookie to display.
- std::string cookie_line_;
+ const std::string cookie_line_;
- // Local storage info to display.
- BrowsingDataLocalStorageHelper::LocalStorageInfo storage_info_;
+ // LocalStorage key/value.
+ const string16 local_storage_key_;
+ const string16 local_storage_value_;
- // Whether we're showing cookie UI as opposed to other site data.
- bool cookie_ui_;
-
// Delegate. The caller should provide one in order to receive results
// from this delegate.
CookiePromptModalDialogDelegate* delegate_;

Powered by Google App Engine
This is Rietveld 408576698