Commit f4ae1808 authored by tzik's avatar tzik Committed by Commit bot

Simplify a base::Callback rebinding in web_view_permission_helper.cc

Taking a method pointer to Callback::Run is problematic for upcoming
refactoring of it.

Review-Url: https://codereview.chromium.org/2754793003
Cr-Commit-Position: refs/heads/master@{#457754}
parent e78674d2
...@@ -323,10 +323,7 @@ int WebViewPermissionHelper::RequestPermission( ...@@ -323,10 +323,7 @@ int WebViewPermissionHelper::RequestPermission(
// after creation. This is to allow those same objects to be accessed again // after creation. This is to allow those same objects to be accessed again
// in the same scope without fear of use after freeing. // in the same scope without fear of use after freeing.
base::ThreadTaskRunnerHandle::Get()->PostTask( base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, FROM_HERE, base::Bind(callback, allowed_by_default, std::string()));
base::Bind(&PermissionResponseCallback::Run,
base::Owned(new PermissionResponseCallback(callback)),
allowed_by_default, std::string()));
return webview::kInvalidPermissionRequestID; return webview::kInvalidPermissionRequestID;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment