Chromium Code Reviews| Index: chromeos/printing/ppd_provider.cc |
| diff --git a/chromeos/printing/ppd_provider.cc b/chromeos/printing/ppd_provider.cc |
| index aa62d8b35c737ca08ee08911e5d6f78b4f9c4d6c..bb6ea89b0396edb4ae70b3968e43a3b6b43f5c46 100644 |
| --- a/chromeos/printing/ppd_provider.cc |
| +++ b/chromeos/printing/ppd_provider.cc |
| @@ -17,6 +17,7 @@ |
| #include "base/files/file_util.h" |
| #include "base/json/json_parser.h" |
| #include "base/memory/ptr_util.h" |
| +#include "base/sequenced_task_runner.h" |
| #include "base/strings/string_number_conversions.h" |
| #include "base/strings/string_split.h" |
| #include "base/strings/string_tokenizer.h" |
| @@ -24,6 +25,7 @@ |
| #include "base/strings/stringprintf.h" |
| #include "base/synchronization/lock.h" |
| #include "base/task_runner_util.h" |
| +#include "base/task_scheduler/post_task.h" |
| #include "base/threading/sequenced_task_runner_handle.h" |
| #include "base/threading/thread_restrictions.h" |
| #include "base/time/time.h" |
| @@ -201,12 +203,13 @@ class PpdProviderImpl : public PpdProvider, public net::URLFetcherDelegate { |
| const std::string& browser_locale, |
| scoped_refptr<net::URLRequestContextGetter> url_context_getter, |
| scoped_refptr<PpdCache> ppd_cache, |
| - scoped_refptr<base::SequencedTaskRunner> disk_task_runner, |
| const PpdProvider::Options& options) |
| : browser_locale_(browser_locale), |
| url_context_getter_(url_context_getter), |
| ppd_cache_(ppd_cache), |
| - disk_task_runner_(disk_task_runner), |
| + disk_task_runner_(base::CreateSequencedTaskRunnerWithTraits( |
| + {base::TaskPriority::USER_BLOCKING, |
|
gab
2017/06/19 15:13:22
Are you sure this is USER_BLOCKING? It was previou
skau
2017/06/19 23:31:08
No. This should have been USER_VISIBLE. It is no
|
| + base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})), |
| options_(options), |
| weak_factory_(this) {} |
| @@ -1001,11 +1004,9 @@ scoped_refptr<PpdProvider> PpdProvider::Create( |
| const std::string& browser_locale, |
| scoped_refptr<net::URLRequestContextGetter> url_context_getter, |
| scoped_refptr<PpdCache> ppd_cache, |
| - scoped_refptr<base::SequencedTaskRunner> disk_task_runner, |
| const PpdProvider::Options& options) { |
| - return scoped_refptr<PpdProvider>( |
| - new PpdProviderImpl(browser_locale, url_context_getter, ppd_cache, |
| - disk_task_runner, options)); |
| + return scoped_refptr<PpdProvider>(new PpdProviderImpl( |
| + browser_locale, url_context_getter, ppd_cache, options)); |
| } |
| } // namespace printing |
| } // namespace chromeos |