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

Unified Diff: content/child/quota_dispatcher.cc

Issue 185793004: [Quota] Pass user gesture state with quota request message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove quota_types.cc Created 6 years, 9 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
Index: content/child/quota_dispatcher.cc
diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc
index 8d21d95027164229be686ff42db5e67d809054ff..e324acd0c73e8559c64e64018ae99be0c8bfb110 100644
--- a/content/child/quota_dispatcher.cc
+++ b/content/child/quota_dispatcher.cc
@@ -13,6 +13,7 @@
#include "content/common/quota_messages.h"
#include "third_party/WebKit/public/platform/WebStorageQuotaCallbacks.h"
#include "third_party/WebKit/public/platform/WebStorageQuotaType.h"
+#include "third_party/WebKit/public/web/WebUserGestureIndicator.h"
#include "url/gurl.h"
using blink::WebStorageQuotaCallbacks;
@@ -126,8 +127,16 @@ void QuotaDispatcher::RequestStorageQuota(
DCHECK(CurrentWorkerId() == 0);
int request_id = quota_message_filter_->GenerateRequestID(CurrentWorkerId());
pending_quota_callbacks_.AddWithID(callback, request_id);
- thread_safe_sender_->Send(new QuotaHostMsg_RequestStorageQuota(
- render_view_id, request_id, origin_url, type, requested_size));
+
+ RequestStorageQuotaParams params;
+ params.render_view_id = render_view_id;
+ params.request_id = request_id;
+ params.origin_url = origin_url;
+ params.storage_type = type;
+ params.requested_size = requested_size;
+ params.user_gesture =
+ blink::WebUserGestureIndicator::isProcessingUserGesture();
+ thread_safe_sender_->Send(new QuotaHostMsg_RequestStorageQuota(params));
}
// static

Powered by Google App Engine
This is Rietveld 408576698