diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-16 01:54:31 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-16 01:54:31 +0000 |
commit | e67eb42a67faaa070b80a391cb1b11e39d8e6368 (patch) | |
tree | 8b4e2a295466b2e6e1c3f1092ca1abeb7e2abbc6 | |
parent | f8e376bb9f0d7991e24d419efb958038ab533cf6 (diff) | |
download | chromium_src-e67eb42a67faaa070b80a391cb1b11e39d8e6368.zip chromium_src-e67eb42a67faaa070b80a391cb1b11e39d8e6368.tar.gz chromium_src-e67eb42a67faaa070b80a391cb1b11e39d8e6368.tar.bz2 |
Disable infobars for shell windows.
this fixes webkitStorageInfo.requestQuota for platform apps in that the callback will actually be called (it acts as if the user always denies the request).
BUG=132219
TEST=see bug
Review URL: https://chromiumcodereview.appspot.com/10532175
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142559 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/chrome_quota_permission_context.cc | 7 | ||||
-rw-r--r-- | chrome/browser/ui/extensions/shell_window.cc | 6 |
2 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc index 884f110..a3835e7 100644 --- a/chrome/browser/chrome_quota_permission_context.cc +++ b/chrome/browser/chrome_quota_permission_context.cc @@ -67,7 +67,6 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate { } virtual string16 GetMessageText() const OVERRIDE; - virtual void InfoBarDismissed() OVERRIDE; virtual bool Accept() OVERRIDE; virtual bool Cancel() OVERRIDE; @@ -79,12 +78,6 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate { DISALLOW_COPY_AND_ASSIGN(RequestQuotaInfoBarDelegate); }; -void RequestQuotaInfoBarDelegate::InfoBarDismissed() { - context_->DispatchCallbackOnIOThread( - callback_, - QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED); -} - string16 RequestQuotaInfoBarDelegate::GetMessageText() const { return l10n_util::GetStringFUTF16( (requested_quota_ > kRequestLargeQuotaThreshold ? diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc index b092211..af6aa86 100644 --- a/chrome/browser/ui/extensions/shell_window.cc +++ b/chrome/browser/ui/extensions/shell_window.cc @@ -9,6 +9,7 @@ #include "chrome/browser/extensions/shell_window_registry.h" #include "chrome/browser/file_select_helper.h" #include "chrome/browser/intents/web_intents_util.h" +#include "chrome/browser/infobars/infobar_tab_helper.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/session_id.h" @@ -92,6 +93,11 @@ ShellWindow::ShellWindow(Profile* profile, registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING, content::NotificationService::AllSources()); + // Automatically dismiss all infobars. + TabContents* tab_contents = TabContents::FromWebContents(web_contents_); + InfoBarTabHelper* infobar_helper = tab_contents->infobar_tab_helper(); + infobar_helper->set_infobars_enabled(false); + // Prevent the browser process from shutting down while this window is open. browser::StartKeepAlive(); } |