summaryrefslogtreecommitdiffstats
path: root/chrome/browser/in_process_webkit
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 20:21:04 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-17 20:21:04 +0000
commit5d9163e2136f0b4eef4aac3e650f1b6e655118fd (patch)
treeed86b9c0422989d8c4d90cf628ca9f6239bd5d8b /chrome/browser/in_process_webkit
parent87c23d51618a288127eed63419e4f26d770f74c5 (diff)
downloadchromium_src-5d9163e2136f0b4eef4aac3e650f1b6e655118fd.zip
chromium_src-5d9163e2136f0b4eef4aac3e650f1b6e655118fd.tar.gz
chromium_src-5d9163e2136f0b4eef4aac3e650f1b6e655118fd.tar.bz2
Remove vestigial cookie/web app permissions prompting UI now that the async UI has been approved for M7.This allows me to more easily change the way the appmodal dialog system works.
http://crbug.com/55121 TEST=existing tests Review URL: http://codereview.chromium.org/3299020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59838 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/in_process_webkit')
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_area.cc14
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_permission_request.cc66
-rw-r--r--chrome/browser/in_process_webkit/dom_storage_permission_request.h64
3 files changed, 0 insertions, 144 deletions
diff --git a/chrome/browser/in_process_webkit/dom_storage_area.cc b/chrome/browser/in_process_webkit/dom_storage_area.cc
index 4fa247f..d16e99a 100644
--- a/chrome/browser/in_process_webkit/dom_storage_area.cc
+++ b/chrome/browser/in_process_webkit/dom_storage_area.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/in_process_webkit/dom_storage_context.h"
#include "chrome/browser/in_process_webkit/dom_storage_dispatcher_host.h"
#include "chrome/browser/in_process_webkit/dom_storage_namespace.h"
-#include "chrome/browser/in_process_webkit/dom_storage_permission_request.h"
#include "chrome/browser/host_content_settings_map.h"
#include "chrome/common/render_messages.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
@@ -98,18 +97,5 @@ bool DOMStorageArea::CheckContentSetting(
ContentSetting content_setting =
host_content_settings_map_->GetContentSetting(
origin_url_, CONTENT_SETTINGS_TYPE_COOKIES, "");
-
- if (content_setting == CONTENT_SETTING_ASK) {
- DOMStoragePermissionRequest request(origin_url_, key, value,
- host_content_settings_map_);
- ChromeThread::PostTask(
- ChromeThread::UI, FROM_HERE,
- NewRunnableFunction(&DOMStoragePermissionRequest::PromptUser,
- &request));
- // Tell the renderer that it needs to run a nested message loop.
- sender->Send(new ViewMsg_SignalCookiePromptEvent());
- content_setting = request.WaitOnResponse();
- }
-
return (content_setting != CONTENT_SETTING_BLOCK);
}
diff --git a/chrome/browser/in_process_webkit/dom_storage_permission_request.cc b/chrome/browser/in_process_webkit/dom_storage_permission_request.cc
deleted file mode 100644
index cd6603b..0000000
--- a/chrome/browser/in_process_webkit/dom_storage_permission_request.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/in_process_webkit/dom_storage_permission_request.h"
-
-#include "chrome/browser/browser_list.h"
-#include "chrome/browser/chrome_thread.h"
-#include "chrome/browser/message_box_handler.h"
-
-DOMStoragePermissionRequest::DOMStoragePermissionRequest(
- const GURL& url,
- const string16& key,
- const string16& value,
- HostContentSettingsMap* settings)
- : url_(url),
- key_(key),
- value_(value),
- response_content_setting_(CONTENT_SETTING_DEFAULT),
- event_(true, false), // manual reset, not initially signaled
- host_content_settings_map_(settings) {
-}
-
-ContentSetting DOMStoragePermissionRequest::WaitOnResponse() {
- event_.Wait();
- return response_content_setting_;
-}
-
-// static
-void DOMStoragePermissionRequest::PromptUser(
- DOMStoragePermissionRequest* request) {
- DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI));
-
- // Cookie settings may have changed.
- ContentSetting setting =
- request->host_content_settings_map_->GetContentSetting(
- request->url_, CONTENT_SETTINGS_TYPE_COOKIES, "");
- if (setting != CONTENT_SETTING_ASK) {
- request->SendResponse(setting);
- return;
- }
-
- Browser* browser = BrowserList::GetLastActive();
- if (!browser || !browser->GetSelectedTabContents()) {
- request->SendResponse(CONTENT_SETTING_BLOCK);
- return;
- }
-
- RunLocalStoragePrompt(browser->GetSelectedTabContents(),
- request->host_content_settings_map_, request->url_,
- request->key_, request->value_, request);
-}
-
-void DOMStoragePermissionRequest::AllowSiteData(bool session_expire) {
- SendResponse(CONTENT_SETTING_ALLOW);
-}
-
-void DOMStoragePermissionRequest::BlockSiteData() {
- SendResponse(CONTENT_SETTING_BLOCK);
-}
-
-void DOMStoragePermissionRequest::SendResponse(
- ContentSetting content_setting) {
- response_content_setting_ = content_setting;
- event_.Signal();
-}
diff --git a/chrome/browser/in_process_webkit/dom_storage_permission_request.h b/chrome/browser/in_process_webkit/dom_storage_permission_request.h
deleted file mode 100644
index da2ffc1..0000000
--- a/chrome/browser/in_process_webkit/dom_storage_permission_request.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_
-#define CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_
-#pragma once
-
-#include "base/ref_counted.h"
-#include "base/string16.h"
-#include "base/time.h"
-#include "base/waitable_event.h"
-#include "chrome/browser/host_content_settings_map.h"
-#include "chrome/browser/cookie_prompt_modal_dialog_delegate.h"
-#include "chrome/common/content_settings.h"
-#include "googleurl/src/gurl.h"
-
-// This class is used to request content setting related permission for local
-// storage. It should only be used for one such event and then discarded.
-class DOMStoragePermissionRequest : public CookiePromptModalDialogDelegate {
- public:
- DOMStoragePermissionRequest(const GURL& url,
- const string16& key,
- const string16& value,
- HostContentSettingsMap* settings);
-
-
- ContentSetting WaitOnResponse();
-
- const GURL& url() const { return url_; }
- const string16& key() const { return key_; }
- const string16& value() const { return value_; }
-
- // Called on the UI thread.
- static void PromptUser(DOMStoragePermissionRequest* request);
-
- // CookiesPromptViewDelegate methods:
- virtual void AllowSiteData(bool session_expire);
- virtual void BlockSiteData();
-
- private:
- void SendResponse(ContentSetting content_setting);
-
- // The URL we need to get permission for.
- const GURL url_;
-
- // The key we're trying to set.
- const string16 key_;
-
- // The value we're trying to set.
- const string16 value_;
-
- // The response to the permission request.
- ContentSetting response_content_setting_;
-
- // One time use. Never reset.
- base::WaitableEvent event_;
-
- scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStoragePermissionRequest);
-};
-
-#endif // CHROME_BROWSER_IN_PROCESS_WEBKIT_DOM_STORAGE_PERMISSION_REQUEST_H_