support https, ws, wss builtin schemes to be intercepted

This commit is contained in:
deepak1556 2015-05-11 12:56:36 +05:30
parent 7fee639edf
commit 707503ac40
4 changed files with 37 additions and 4 deletions

View file

@ -61,7 +61,13 @@ net::URLRequestJobFactory* AtomBrowserContext::CreateURLRequestJobFactory(
BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)));
job_factory->SetProtocolHandler(
url::kHttpScheme, new HttpProtocolHandler());
url::kHttpScheme, new HttpProtocolHandler(url::kHttpScheme));
job_factory->SetProtocolHandler(
url::kHttpsScheme, new HttpProtocolHandler(url::kHttpsScheme));
job_factory->SetProtocolHandler(
url::kWsScheme, new HttpProtocolHandler(url::kWsScheme));
job_factory->SetProtocolHandler(
url::kWssScheme, new HttpProtocolHandler(url::kWssScheme));
// Set up interceptors in the reverse order.
scoped_ptr<net::URLRequestJobFactory> top_job_factory = job_factory.Pass();