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

Side by Side Diff: chrome/browser/cookie_modal_dialog.h

Issue 1338001: Block database access on allowDatabase instead of databaseOpenFile. (Closed)
Patch Set: without worker support Created 10 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_ 5 #ifndef CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
6 #define CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_ 6 #define CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/ref_counted.h" 10 #include "base/ref_counted.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 CookiePromptModalDialog(TabContents* tab_contents, 45 CookiePromptModalDialog(TabContents* tab_contents,
46 HostContentSettingsMap* host_content_settings_map, 46 HostContentSettingsMap* host_content_settings_map,
47 const GURL& origin, 47 const GURL& origin,
48 const string16& key, 48 const string16& key,
49 const string16& value, 49 const string16& value,
50 CookiePromptModalDialogDelegate* delegate); 50 CookiePromptModalDialogDelegate* delegate);
51 CookiePromptModalDialog(TabContents* tab_contents, 51 CookiePromptModalDialog(TabContents* tab_contents,
52 HostContentSettingsMap* host_content_settings_map, 52 HostContentSettingsMap* host_content_settings_map,
53 const GURL& origin, 53 const GURL& origin,
54 const string16& database_name, 54 const string16& database_name,
55 const string16& display_name,
56 unsigned long estimated_size,
55 CookiePromptModalDialogDelegate* delegate); 57 CookiePromptModalDialogDelegate* delegate);
56 CookiePromptModalDialog(TabContents* tab_contents, 58 CookiePromptModalDialog(TabContents* tab_contents,
57 HostContentSettingsMap* host_content_settings_map, 59 HostContentSettingsMap* host_content_settings_map,
58 const GURL& appcache_manifest_url, 60 const GURL& appcache_manifest_url,
59 CookiePromptModalDialogDelegate* delegate); 61 CookiePromptModalDialogDelegate* delegate);
60 virtual ~CookiePromptModalDialog(); 62 virtual ~CookiePromptModalDialog();
61 63
62 static void RegisterPrefs(PrefService* prefs); 64 static void RegisterPrefs(PrefService* prefs);
63 65
64 // AppModalDialog overrides. 66 // AppModalDialog overrides.
65 #if defined(OS_LINUX) || defined(OS_MACOSX) 67 #if defined(OS_LINUX) || defined(OS_MACOSX)
66 virtual void CreateAndShowDialog(); 68 virtual void CreateAndShowDialog();
67 #endif 69 #endif
68 virtual int GetDialogButtons(); 70 virtual int GetDialogButtons();
69 virtual void AcceptWindow(); 71 virtual void AcceptWindow();
70 virtual void CancelWindow(); 72 virtual void CancelWindow();
71 virtual bool IsValid(); 73 virtual bool IsValid();
72 74
73 #if defined(OS_MACOSX) 75 #if defined(OS_MACOSX)
74 virtual void CloseModalDialog(); 76 virtual void CloseModalDialog();
75 #endif 77 #endif
76 78
77 DialogType dialog_type() const { return dialog_type_; } 79 DialogType dialog_type() const { return dialog_type_; }
78 const GURL& origin() const { return origin_; } 80 const GURL& origin() const { return origin_; }
79 const std::string& cookie_line() const { return cookie_line_; } 81 const std::string& cookie_line() const { return cookie_line_; }
80 const string16& local_storage_key() const { return local_storage_key_; } 82 const string16& local_storage_key() const { return local_storage_key_; }
81 const string16& local_storage_value() const { return local_storage_value_; } 83 const string16& local_storage_value() const { return local_storage_value_; }
82 const string16& database_name() const { return database_name_; } 84 const string16& database_name() const { return database_name_; }
85 const string16& display_name() const { return display_name_; }
86 unsigned long estimated_size() const { return estimated_size_; }
83 const GURL& appcache_manifest_url() const { return appcache_manifest_url_; } 87 const GURL& appcache_manifest_url() const { return appcache_manifest_url_; }
84 TabContents* tab_contents() const { return tab_contents_; } 88 TabContents* tab_contents() const { return tab_contents_; }
85 89
86 // Implement CookiePromptModalDialogDelegate. 90 // Implement CookiePromptModalDialogDelegate.
87 virtual void AllowSiteData(bool remember, bool session_expire); 91 virtual void AllowSiteData(bool remember, bool session_expire);
88 virtual void BlockSiteData(bool remember); 92 virtual void BlockSiteData(bool remember);
89 93
90 protected: 94 protected:
91 // AppModalDialog overrides. 95 // AppModalDialog overrides.
92 virtual NativeDialog CreateNativeDialog(); 96 virtual NativeDialog CreateNativeDialog();
(...skipping 14 matching lines...) Expand all
107 const DialogType dialog_type_; 111 const DialogType dialog_type_;
108 112
109 // The origin connected to this request. 113 // The origin connected to this request.
110 const GURL origin_; 114 const GURL origin_;
111 115
112 // Which data members are relevant depends on the dialog_type. 116 // Which data members are relevant depends on the dialog_type.
113 const std::string cookie_line_; 117 const std::string cookie_line_;
114 const string16 local_storage_key_; 118 const string16 local_storage_key_;
115 const string16 local_storage_value_; 119 const string16 local_storage_value_;
116 const string16 database_name_; 120 const string16 database_name_;
121 const string16 display_name_;
122 unsigned long estimated_size_;
117 const GURL appcache_manifest_url_; 123 const GURL appcache_manifest_url_;
118 124
119 // The caller should provide a delegate in order to receive results 125 // The caller should provide a delegate in order to receive results
120 // from this delegate. Any time after calling one of these methods, the 126 // from this delegate. Any time after calling one of these methods, the
121 // delegate could be deleted 127 // delegate could be deleted
122 CookiePromptModalDialogDelegate* delegate_; 128 CookiePromptModalDialogDelegate* delegate_;
123 129
124 #if defined(OS_LINUX) 130 #if defined(OS_LINUX)
125 // The "remember this choice" radio button in the dialog. 131 // The "remember this choice" radio button in the dialog.
126 GtkWidget* remember_radio_; 132 GtkWidget* remember_radio_;
127 #endif 133 #endif
128 134
129 DISALLOW_COPY_AND_ASSIGN(CookiePromptModalDialog); 135 DISALLOW_COPY_AND_ASSIGN(CookiePromptModalDialog);
130 }; 136 };
131 137
132 #endif // CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_ 138 #endif // CHROME_BROWSER_COOKIE_MODAL_DIALOG_H_
133 139
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cookie_modal_dialog.cc » ('j') | chrome/browser/renderer_host/database_dispatcher_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698