| Index: extensions/browser/content_hash_fetcher.cc
|
| diff --git a/extensions/browser/content_hash_fetcher.cc b/extensions/browser/content_hash_fetcher.cc
|
| index 1f73cb626c7454f4e82661f58cb9ce8b329f846d..7962630b26352f41dc0df07a19e442ea68a71d58 100644
|
| --- a/extensions/browser/content_hash_fetcher.cc
|
| +++ b/extensions/browser/content_hash_fetcher.cc
|
| @@ -18,7 +18,8 @@
|
| #include "base/memory/ref_counted.h"
|
| #include "base/metrics/histogram_macros.h"
|
| #include "base/synchronization/lock.h"
|
| -#include "base/task_scheduler/post_task.h"
|
| +#include "base/task_runner_util.h"
|
| +#include "base/threading/sequenced_worker_pool.h"
|
| #include "base/timer/elapsed_timer.h"
|
| #include "base/version.h"
|
| #include "content/public/browser/browser_thread.h"
|
| @@ -195,10 +196,11 @@
|
| void ContentHashFetcherJob::Start() {
|
| base::FilePath verified_contents_path =
|
| file_util::GetVerifiedContentsPath(extension_path_);
|
| - base::PostTaskWithTraitsAndReplyWithResult(
|
| - FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
|
| - base::TaskPriority::USER_VISIBLE),
|
| - base::Bind(&ContentHashFetcherJob::LoadVerifiedContents, this,
|
| + base::PostTaskAndReplyWithResult(
|
| + content::BrowserThread::GetBlockingPool(),
|
| + FROM_HERE,
|
| + base::Bind(&ContentHashFetcherJob::LoadVerifiedContents,
|
| + this,
|
| verified_contents_path),
|
| base::Bind(&ContentHashFetcherJob::DoneCheckingForVerifiedContents,
|
| this));
|
| @@ -287,12 +289,12 @@
|
| base::FilePath destination =
|
| file_util::GetVerifiedContentsPath(extension_path_);
|
| size_t size = response->size();
|
| - base::PostTaskWithTraitsAndReplyWithResult(
|
| - FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
|
| - base::TaskPriority::USER_VISIBLE),
|
| + base::PostTaskAndReplyWithResult(
|
| + content::BrowserThread::GetBlockingPool(),
|
| + FROM_HERE,
|
| base::Bind(&WriteFileHelper, destination, base::Passed(&response)),
|
| - base::Bind(&ContentHashFetcherJob::OnVerifiedContentsWritten, this,
|
| - size));
|
| + base::Bind(
|
| + &ContentHashFetcherJob::OnVerifiedContentsWritten, this, size));
|
| } else {
|
| DoneFetchingVerifiedContents(false);
|
| }
|
|
|