fill net::URLRequest details on IO thread

This commit is contained in:
deepak1556 2016-06-08 19:22:21 +05:30
parent 414183e0fd
commit 0e0235407b
14 changed files with 59 additions and 44 deletions

View file

@ -44,7 +44,7 @@ void HandlerCallback(const BeforeStartCallback& before_start,
void AskForOptions(v8::Isolate* isolate,
const JavaScriptHandler& handler,
net::URLRequest* request,
std::unique_ptr<base::DictionaryValue> request_details,
const BeforeStartCallback& before_start,
const ResponseCallback& callback) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@ -53,7 +53,7 @@ void AskForOptions(v8::Isolate* isolate,
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Context::Scope context_scope(context);
handler.Run(
request,
*(request_details.get()),
mate::ConvertToV8(isolate,
base::Bind(&HandlerCallback, before_start, callback)));
}