protocol: adding error job to log error with custom protocols

This commit is contained in:
deepak1556 2015-05-07 13:12:35 +05:30
parent e5380fd671
commit 9ab53b0e4b
5 changed files with 49 additions and 2 deletions

View file

@ -105,6 +105,14 @@ class CustomProtocolRequestJob : public AdapterRequestJob {
base::Bind(&AdapterRequestJob::CreateFileJobAndStart,
GetWeakPtr(), path));
return;
} else if (name == "RequestErrorJob") {
int error;
dict.Get("error", &error);
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
base::Bind(&AdapterRequestJob::CreateErrorJobAndStart,
GetWeakPtr(), error));
return;
}
}