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

Unified Diff: chrome/browser/chrome_quota_permission_context.cc

Issue 9566035: Move QuotaPermissionContext to content/public/browser and put it in the content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 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
« no previous file with comments | « chrome/browser/chrome_quota_permission_context.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_quota_permission_context.cc
diff --git a/chrome/browser/chrome_quota_permission_context.cc b/chrome/browser/chrome_quota_permission_context.cc
index 5da3f8d37d7d026ce2545d365c46cd650a26d3bf..522a48df8c495a5cf98543fb81dc9a50a55c92f4 100644
--- a/chrome/browser/chrome_quota_permission_context.cc
+++ b/chrome/browser/chrome_quota_permission_context.cc
@@ -25,6 +25,7 @@
#include "webkit/quota/quota_types.h"
using content::BrowserThread;
+using content::QuotaPermissionContext;
using content::WebContents;
namespace {
@@ -55,7 +56,8 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual ~RequestQuotaInfoBarDelegate() {
if (!callback_.is_null())
context_->DispatchCallbackOnIOThread(
- callback_, QuotaPermissionContext::kResponseCancelled);
+ callback_,
+ QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
}
virtual bool ShouldExpire(
@@ -79,7 +81,8 @@ class RequestQuotaInfoBarDelegate : public ConfirmInfoBarDelegate {
void RequestQuotaInfoBarDelegate::InfoBarDismissed() {
context_->DispatchCallbackOnIOThread(
- callback_, QuotaPermissionContext::kResponseCancelled);
+ callback_,
+ QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
}
string16 RequestQuotaInfoBarDelegate::GetMessageText() const {
@@ -92,13 +95,15 @@ string16 RequestQuotaInfoBarDelegate::GetMessageText() const {
bool RequestQuotaInfoBarDelegate::Accept() {
context_->DispatchCallbackOnIOThread(
- callback_, QuotaPermissionContext::kResponseAllow);
+ callback_,
+ QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_ALLOW);
return true;
}
bool RequestQuotaInfoBarDelegate::Cancel() {
context_->DispatchCallbackOnIOThread(
- callback_, QuotaPermissionContext::kResponseCancelled);
+ callback_,
+ QuotaPermissionContext::QUOTA_PERMISSION_RESPONSE_CANCELLED);
return true;
}
@@ -120,7 +125,7 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
if (type != quota::kStorageTypePersistent) {
// For now we only support requesting quota with this interface
// for Persistent storage type.
- callback.Run(kResponseDisallow);
+ callback.Run(QUOTA_PERMISSION_RESPONSE_DISALLOW);
return;
}
@@ -139,7 +144,7 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
// The tab may have gone away or the request may not be from a tab.
LOG(WARNING) << "Attempt to request quota tabless renderer: "
<< render_process_id << "," << render_view_id;
- DispatchCallbackOnIOThread(callback, kResponseCancelled);
+ DispatchCallbackOnIOThread(callback, QUOTA_PERMISSION_RESPONSE_CANCELLED);
return;
}
@@ -154,7 +159,7 @@ void ChromeQuotaPermissionContext::RequestQuotaPermission(
void ChromeQuotaPermissionContext::DispatchCallbackOnIOThread(
const PermissionCallback& callback,
- Response response) {
+ QuotaPermissionResponse response) {
DCHECK_EQ(false, callback.is_null());
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
« no previous file with comments | « chrome/browser/chrome_quota_permission_context.h ('k') | content/browser/mock_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698