diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-23 05:02:06 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-23 05:02:06 +0000 |
commit | b3ffd3bafc7f136c00b16b06c7c39d446303ceb2 (patch) | |
tree | 89959747a9cdf47f134804efb0da06d4a19da35d | |
parent | 5aaa076c87d38272ee9e38ed827b8d4ad2777c05 (diff) | |
download | chromium_src-b3ffd3bafc7f136c00b16b06c7c39d446303ceb2.zip chromium_src-b3ffd3bafc7f136c00b16b06c7c39d446303ceb2.tar.gz chromium_src-b3ffd3bafc7f136c00b16b06c7c39d446303ceb2.tar.bz2 |
Small preparation for the cookie confirmation dialog on linux/osx.
BUG=34894,35178
Review URL: http://codereview.chromium.org/650204
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39696 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/in_process_webkit/dom_storage_permission_request.cc | 6 | ||||
-rw-r--r-- | chrome/browser/message_box_handler.cc | 24 | ||||
-rw-r--r-- | chrome/browser/message_box_handler.h | 3 | ||||
-rw-r--r-- | chrome/browser/net/chrome_cookie_policy.cc | 6 | ||||
-rw-r--r-- | chrome/browser/renderer_host/database_permission_request.cc | 6 |
5 files changed, 21 insertions, 24 deletions
diff --git a/chrome/browser/in_process_webkit/dom_storage_permission_request.cc b/chrome/browser/in_process_webkit/dom_storage_permission_request.cc index 08dc0ba..d15e49b 100644 --- a/chrome/browser/in_process_webkit/dom_storage_permission_request.cc +++ b/chrome/browser/in_process_webkit/dom_storage_permission_request.cc @@ -44,15 +44,9 @@ void DOMStoragePermissionRequest::PromptUser( return; } -#if defined(OS_WIN) RunLocalStoragePrompt(browser->GetSelectedTabContents(), request->host_content_settings_map_, request->url_, request->key_, request->value_, request); -#else - // TODO(darin): Enable prompting for other ports. - NOTIMPLEMENTED(); - request->SendResponse(CONTENT_SETTING_BLOCK); -#endif } void DOMStoragePermissionRequest::AllowSiteData(bool session_expire) { diff --git a/chrome/browser/message_box_handler.cc b/chrome/browser/message_box_handler.cc index 6b9fa93..3c249d2 100644 --- a/chrome/browser/message_box_handler.cc +++ b/chrome/browser/message_box_handler.cc @@ -58,15 +58,21 @@ void RunBeforeUnloadDialog(TabContents* tab_contents, std::wstring(), false, true, reply_msg)); } -#if defined(OS_WIN) void RunCookiePrompt(TabContents* tab_contents, HostContentSettingsMap* host_content_settings_map, const GURL& origin, const std::string& cookie_line, CookiePromptModalDialogDelegate* delegate) { +#if defined(OS_WIN) Singleton<AppModalDialogQueue>()->AddDialog( new CookiePromptModalDialog(tab_contents, host_content_settings_map, origin, cookie_line, delegate)); +#else + // Linux: http://crbug.com/35178 + // Mac: http://crbug.com/34894 + NOTIMPLEMENTED(); + delegate->BlockSiteData(); +#endif } void RunLocalStoragePrompt( @@ -76,9 +82,16 @@ void RunLocalStoragePrompt( const string16& key, const string16& value, CookiePromptModalDialogDelegate* delegate) { +#if defined(OS_WIN) Singleton<AppModalDialogQueue>()->AddDialog( new CookiePromptModalDialog(tab_contents, host_content_settings_map, origin, key, value, delegate)); +#else + // Linux: http://crbug.com/35178 + // Mac: http://crbug.com/34894 + NOTIMPLEMENTED(); + delegate->BlockSiteData(); +#endif } void RunDatabasePrompt( @@ -87,9 +100,14 @@ void RunDatabasePrompt( const GURL& origin, const string16& database_name, CookiePromptModalDialogDelegate* delegate) { +#if defined(OS_WIN) Singleton<AppModalDialogQueue>()->AddDialog( new CookiePromptModalDialog(tab_contents, host_content_settings_map, origin, database_name, delegate)); -} +#else + // Linux: http://crbug.com/35178 + // Mac: http://crbug.com/34894 + NOTIMPLEMENTED(); + delegate->BlockSiteData(); #endif - +} diff --git a/chrome/browser/message_box_handler.h b/chrome/browser/message_box_handler.h index 792055d..cf08804 100644 --- a/chrome/browser/message_box_handler.h +++ b/chrome/browser/message_box_handler.h @@ -41,8 +41,6 @@ void RunBeforeUnloadDialog(TabContents* tab_contents, const std::wstring& message_text, IPC::Message* reply_msg); -// TODO(zelidrag): bug 32719, implement these modal dialogs on Linux and Mac. -#if defined(OS_WIN) // This will display a modal dialog box with cookie information asking // user to accept or reject the cookie. The caller should pass |delegate| // that will handle the reply from the dialog. @@ -72,7 +70,6 @@ void RunDatabasePrompt( const GURL& origin, const string16& database_name, CookiePromptModalDialogDelegate* delegate); -#endif #endif // CHROME_BROWSER_MESSAGE_BOX_HANDLER_H_ diff --git a/chrome/browser/net/chrome_cookie_policy.cc b/chrome/browser/net/chrome_cookie_policy.cc index 159b4f0..a3d583a 100644 --- a/chrome/browser/net/chrome_cookie_policy.cc +++ b/chrome/browser/net/chrome_cookie_policy.cc @@ -174,15 +174,9 @@ void ChromeCookiePolicy::PromptForSetCookie(const GURL& url, return; } -#if defined(OS_WIN) RunCookiePrompt(browser->GetSelectedTabContents(), host_content_settings_map_, url, cookie_line, new PromptDelegate(this, host)); -#else - // TODO(darin): Enable prompting for other ports. - NOTIMPLEMENTED(); - DidPromptForSetCookie(host, net::ERR_ACCESS_DENIED); -#endif } void ChromeCookiePolicy::DidPromptForSetCookie(const std::string& host, diff --git a/chrome/browser/renderer_host/database_permission_request.cc b/chrome/browser/renderer_host/database_permission_request.cc index 95a47de..5efb567 100644 --- a/chrome/browser/renderer_host/database_permission_request.cc +++ b/chrome/browser/renderer_host/database_permission_request.cc @@ -51,17 +51,11 @@ void DatabasePermissionRequest::RequestPermission() { return; } -#if defined(OS_WIN) self_ref_ = this; // Will call either AllowSiteData or BlockSiteData which will NULL out our // self reference. RunDatabasePrompt(browser->GetSelectedTabContents(), host_content_settings_map_, url_, database_name_, this); -#else - // TODO(jorlow): Enable prompting for other ports. - NOTIMPLEMENTED(); - BlockSiteData(); -#endif } void DatabasePermissionRequest::AllowSiteData(bool session_expire) { |