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

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: Change name, file 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
« no previous file with comments | « content/browser/quota_dispatcher_host.cc ('k') | content/common/quota_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/quota_dispatcher.cc
diff --git a/content/child/quota_dispatcher.cc b/content/child/quota_dispatcher.cc
index 8d21d95027164229be686ff42db5e67d809054ff..7f47d66219976237e05b515ea3fda73d1968d753 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));
+
+ StorageQuotaParams 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
« no previous file with comments | « content/browser/quota_dispatcher_host.cc ('k') | content/common/quota_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698