Chromium Code Reviews| Index: chromeos/printing/ppd_provider.h |
| diff --git a/chromeos/printing/ppd_provider.h b/chromeos/printing/ppd_provider.h |
| index ff6d6d3d0e88913efb11783c0969508de77eaecb..246e31799276764a21e7fb6ddb176fdf279850aa 100644 |
| --- a/chromeos/printing/ppd_provider.h |
| +++ b/chromeos/printing/ppd_provider.h |
| @@ -12,6 +12,7 @@ |
| #include "base/callback.h" |
| #include "base/files/file_path.h" |
| +#include "base/sequenced_task_runner.h" |
| #include "chromeos/chromeos_export.h" |
| #include "chromeos/printing/printer_configuration.h" |
| @@ -75,9 +76,13 @@ class CHROMEOS_EXPORT PpdProvider { |
| }; |
| // Create and return a new PpdProvider with the given cache and options. |
| + // |io_task_runner| is used to run operations that are long latency and should |
| + // not be on the UI thread. References to |url_context_getter| and |
| + // |io_task_runner| are taken. |
| static std::unique_ptr<PpdProvider> Create( |
| const std::string& api_key, |
| scoped_refptr<net::URLRequestContextGetter> url_context_getter, |
| + scoped_refptr<base::SequencedTaskRunner> io_task_runner, |
| std::unique_ptr<PpdCache> cache, |
| const Options& options = Options()); |
| @@ -94,11 +99,6 @@ class CHROMEOS_EXPORT PpdProvider { |
| virtual void Resolve(const Printer::PpdReference& ppd_reference, |
| const ResolveCallback& cb) = 0; |
| - // Abort any outstanding Resolve() call. After this returns, it is guaranteed |
| - // that no ResolveCallback will be called until the next time Resolve is |
| - // called. It is a nop to call this if no Resolve() is outstanding. |
| - virtual void AbortResolve() = 0; |
| - |
| // Get all the printer makes and models we can support. |
| // |
| // Must be called from a Sequenced Task context (i.e. |
| @@ -110,12 +110,6 @@ class CHROMEOS_EXPORT PpdProvider { |
| // Only one QueryAvailable() call should be outstanding at a time. |
|
stevenjb
2016/11/14 23:08:39
s/should be/may be/
Carlson
2016/11/14 23:27:41
Done.
|
| virtual void QueryAvailable(const QueryAvailableCallback& cb) = 0; |
| - // Abort any outstanding QueryAvailable() call. After this returns, it is |
| - // guaranteed that no QueryAvailableCallback will be called until the next |
| - // time QueryAvailable() is called. It is a nop to call this if no |
| - // QueryAvailable() is outstanding. |
| - virtual void AbortQueryAvailable() = 0; |
| - |
| // Most of the time, the cache is just an invisible backend to the Provider, |
| // consulted at Resolve time, but in the case of the user doing "Add Printer" |
| // and "Select PPD" locally, then we get into a state where we want to put |