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

Unified Diff: content/browser/frame_host/render_frame_message_filter.cc

Issue 2824193002: Enable use_once_callback for //content/common/*.mojom (Closed)
Patch Set: push_messaging fix Created 3 years, 8 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/browser/frame_host/render_frame_message_filter.cc
diff --git a/content/browser/frame_host/render_frame_message_filter.cc b/content/browser/frame_host/render_frame_message_filter.cc
index 5b8f571ae0ddb1778e3b4fc9e1401d72d1441cd5..c625757b6f737af178beb5cc25349074f27486cd 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -325,7 +325,7 @@ void RenderFrameMessageFilter::CheckPolicyForCookies(
int render_frame_id,
const GURL& url,
const GURL& first_party_for_cookies,
- const GetCookiesCallback& callback,
+ GetCookiesCallback callback,
const net::CookieList& cookie_list) {
net::URLRequestContext* context = GetRequestContextForURL(url);
// Check the policy for get cookies, and pass cookie_list to the
@@ -334,9 +334,9 @@ void RenderFrameMessageFilter::CheckPolicyForCookies(
GetContentClient()->browser()->AllowGetCookie(
url, first_party_for_cookies, cookie_list, resource_context_,
render_process_id_, render_frame_id)) {
- callback.Run(net::CookieStore::BuildCookieLine(cookie_list));
+ std::move(callback).Run(net::CookieStore::BuildCookieLine(cookie_list));
} else {
- callback.Run(std::string());
+ std::move(callback).Run(std::string());
}
}
@@ -406,13 +406,13 @@ void RenderFrameMessageFilter::SetCookie(int32_t render_frame_id,
void RenderFrameMessageFilter::GetCookies(int render_frame_id,
const GURL& url,
const GURL& first_party_for_cookies,
- const GetCookiesCallback& callback) {
+ GetCookiesCallback callback) {
ChildProcessSecurityPolicyImpl* policy =
ChildProcessSecurityPolicyImpl::GetInstance();
if (!policy->CanAccessDataForOrigin(render_process_id_, url)) {
bad_message::ReceivedBadMessage(this,
bad_message::RFMF_GET_COOKIES_BAD_ORIGIN);
- callback.Run(std::string());
+ std::move(callback).Run(std::string());
return;
}
@@ -439,7 +439,8 @@ void RenderFrameMessageFilter::GetCookies(int render_frame_id,
context->cookie_store()->GetCookieListWithOptionsAsync(
url, options,
base::Bind(&RenderFrameMessageFilter::CheckPolicyForCookies, this,
- render_frame_id, url, first_party_for_cookies, callback));
+ render_frame_id, url, first_party_for_cookies,
+ base::Passed(&callback)));
}
#if BUILDFLAG(ENABLE_PLUGINS)

Powered by Google App Engine
This is Rietveld 408576698