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

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

Issue 2824193002: Enable use_once_callback for //content/common/*.mojom (Closed)
Patch Set: rebase 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
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.h ('k') | content/browser/leveldb_wrapper_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 35f7afca2ee45579d1cf460f56933375671dc3a8..bbbb37d8917d3987d9ea3514d9cac343dde8faeb 100644
--- a/content/browser/frame_host/render_frame_message_filter.cc
+++ b/content/browser/frame_host/render_frame_message_filter.cc
@@ -327,7 +327,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
@@ -336,9 +336,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());
}
}
@@ -408,13 +408,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;
}
@@ -441,7 +441,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)
« no previous file with comments | « content/browser/frame_host/render_frame_message_filter.h ('k') | content/browser/leveldb_wrapper_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698