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

Unified Diff: chrome/browser/printing/print_job_worker.cc

Issue 2871303004: Rename TaskRunner::RunsTasksOnCurrentThread() in //chrome (Closed)
Patch Set: fixed build error Created 3 years, 7 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
« no previous file with comments | « chrome/browser/printing/print_job_unittest.cc ('k') | chrome/browser/printing/print_job_worker_owner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.cc
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index 636038b989e812258c16c18bd25004c984c699d6..d06b61aaf6193e83ca91c3d8865317ca21096148 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -116,7 +116,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id,
PrintJobWorkerOwner* owner)
: owner_(owner), thread_("Printing_Worker"), weak_factory_(this) {
// The object is created in the IO thread.
- DCHECK(owner_->RunsTasksOnCurrentThread());
+ DCHECK(owner_->RunsTasksInCurrentSequence());
printing_context_delegate_ = base::MakeUnique<PrintingContextDelegate>(
render_process_id, render_frame_id);
@@ -127,7 +127,7 @@ PrintJobWorker::~PrintJobWorker() {
// The object is normally deleted in the UI thread, but when the user
// cancels printing or in the case of print preview, the worker is destroyed
// on the I/O thread.
- DCHECK(owner_->RunsTasksOnCurrentThread());
+ DCHECK(owner_->RunsTasksInCurrentSequence());
Stop();
}
@@ -142,7 +142,7 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings,
MarginType margin_type,
bool is_scripted,
bool is_modifiable) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK_EQ(page_number_, PageNumber::npos());
// Recursive task processing is needed for the dialog in case it needs to be
@@ -174,7 +174,7 @@ void PrintJobWorker::GetSettings(bool ask_user_for_settings,
void PrintJobWorker::SetSettings(
std::unique_ptr<base::DictionaryValue> new_settings) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
@@ -247,7 +247,7 @@ void PrintJobWorker::UseDefaultSettings() {
}
void PrintJobWorker::StartPrinting(PrintedDocument* new_document) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK_EQ(page_number_, PageNumber::npos());
DCHECK_EQ(document_.get(), new_document);
DCHECK(document_.get());
@@ -279,7 +279,7 @@ void PrintJobWorker::StartPrinting(PrintedDocument* new_document) {
}
void PrintJobWorker::OnDocumentChanged(PrintedDocument* new_document) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK_EQ(page_number_, PageNumber::npos());
if (page_number_ != PageNumber::npos())
@@ -293,7 +293,7 @@ void PrintJobWorker::OnNewPage() {
return;
// message_loop() could return NULL when the print job is cancelled.
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
if (page_number_ == PageNumber::npos()) {
// Find first page to print.
@@ -365,7 +365,7 @@ bool PrintJobWorker::Start() {
}
void PrintJobWorker::OnDocumentDone() {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK_EQ(page_number_, PageNumber::npos());
DCHECK(document_.get());
@@ -385,7 +385,7 @@ void PrintJobWorker::OnDocumentDone() {
}
void PrintJobWorker::SpoolPage(PrintedPage* page) {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
DCHECK_NE(page_number_, PageNumber::npos());
// Signal everyone that the page is about to be printed.
@@ -423,7 +423,7 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) {
}
void PrintJobWorker::OnFailure() {
- DCHECK(task_runner_->RunsTasksOnCurrentThread());
+ DCHECK(task_runner_->RunsTasksInCurrentSequence());
// We may loose our last reference by broadcasting the FAILED event.
scoped_refptr<PrintJobWorkerOwner> handle(owner_);
« no previous file with comments | « chrome/browser/printing/print_job_unittest.cc ('k') | chrome/browser/printing/print_job_worker_owner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698