Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: chrome/browser/chromeos/printing/cups_print_job_manager_impl.h

Issue 2943843002: Convert to CupsPrintJobManagerImpl to TaskScheduler. (Closed)
Patch Set: notification must happen on the browser thread Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
diff --git a/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h b/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
index cdf723691dc5b914fc963c6fa435d7e120698592..35747117e0160a5cb0eaef7c570b907cab83e1d0 100644
--- a/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
+++ b/chrome/browser/chromeos/printing/cups_print_job_manager_impl.h
@@ -11,7 +11,10 @@
#include <unordered_map>
#include <vector>
+#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
+#include "base/sequenced_task_runner.h"
+#include "base/single_thread_task_runner.h"
#include "chrome/browser/chromeos/printing/cups_print_job.h"
#include "chrome/browser/chromeos/printing/cups_print_job_manager.h"
#include "chrome/browser/chromeos/printing/printers_manager.h"
@@ -35,7 +38,9 @@ struct QueryResult {
class CupsPrintJobManagerImpl : public CupsPrintJobManager,
public content::NotificationObserver {
public:
- explicit CupsPrintJobManagerImpl(Profile* profile);
+ CupsPrintJobManagerImpl(
+ Profile* profile,
+ scoped_refptr<base::SingleThreadTaskRunner> browser_thread_runner);
~CupsPrintJobManagerImpl() override;
// CupsPrintJobManager overrides:
@@ -94,6 +99,8 @@ class CupsPrintJobManagerImpl : public CupsPrintJobManager,
::printing::CupsConnection cups_connection_;
content::NotificationRegistrar registrar_;
+ scoped_refptr<base::SingleThreadTaskRunner> browser_thread_runner_;
+ scoped_refptr<base::SequencedTaskRunner> query_runner_;
base::WeakPtrFactory<CupsPrintJobManagerImpl> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(CupsPrintJobManagerImpl);

Powered by Google App Engine
This is Rietveld 408576698