From c9b549ae69d159436f7361558233dfec51701221 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 5 Mar 2015 12:31:45 -0800 Subject: [PATCH] Fix styling of #1199 --- atom/browser/net/adapter_request_job.cc | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/atom/browser/net/adapter_request_job.cc b/atom/browser/net/adapter_request_job.cc index f57592392ec8..ebefa14f123e 100644 --- a/atom/browser/net/adapter_request_job.cc +++ b/atom/browser/net/adapter_request_job.cc @@ -101,20 +101,18 @@ void AdapterRequestJob::CreateFileJobAndStart(const base::FilePath& path) { base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); } else { auto archive = asar::GetOrCreateAsarArchive(asar_path); - if (!archive) + if (archive) + real_job_ = new asar::URLRequestAsarJob( + request(), + network_delegate(), + archive, + relative_path, + content::BrowserThread::GetBlockingPool()-> + GetTaskRunnerWithShutdownBehavior( + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); + else real_job_ = new net::URLRequestErrorJob( - request(), - network_delegate(), - net::ERR_FILE_NOT_FOUND); - - real_job_ = new asar::URLRequestAsarJob( - request(), - network_delegate(), - archive, - relative_path, - content::BrowserThread::GetBlockingPool()-> - GetTaskRunnerWithShutdownBehavior( - base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); + request(), network_delegate(), net::ERR_FILE_NOT_FOUND); } real_job_->Start();