GetBlockingPool has been removed

This commit is contained in:
Samuel Attard 2017-12-18 12:35:51 +11:00 committed by Aleksei Kuzmin
parent 0291dc8214
commit 021e383418
2 changed files with 7 additions and 6 deletions

View file

@ -27,8 +27,8 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
#include "base/threading/worker_pool.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
@ -136,8 +136,9 @@ AtomBrowserContext::CreateURLRequestJobFactory(
url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler));
job_factory->SetProtocolHandler(
url::kFileScheme, base::WrapUnique(new asar::AsarProtocolHandler(
BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN))));
base::CreateSequencedTaskRunnerWithTraits(
{base::MayBlock(),
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}))));
job_factory->SetProtocolHandler(
url::kHttpScheme,
base::WrapUnique(new HttpProtocolHandler(url::kHttpScheme)));

View file

@ -7,6 +7,7 @@
#include <string>
#include "atom/common/atom_constants.h"
#include "base/task_scheduler/post_task.h"
#include "base/threading/sequenced_worker_pool.h"
namespace atom {
@ -31,9 +32,8 @@ void URLRequestAsyncAsarJob::StartAsync(std::unique_ptr<base::Value> options) {
net::URLRequestStatus::FAILED, net::ERR_NOT_IMPLEMENTED));
} else {
asar::URLRequestAsarJob::Initialize(
content::BrowserThread::GetBlockingPool()->
GetTaskRunnerWithShutdownBehavior(
base::SequencedWorkerPool::SKIP_ON_SHUTDOWN),
base::CreateSequencedTaskRunnerWithTraits(
{base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}),
base::FilePath(file_path));
asar::URLRequestAsarJob::Start();
}