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

Side by Side Diff: chrome/browser/printing/printer_query.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/printing/printer_query.h" 5 #include "chrome/browser/printing/printer_query.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return cookie_; 67 return cookie_;
68 } 68 }
69 69
70 void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings, 70 void PrinterQuery::GetSettings(GetSettingsAskParam ask_user_for_settings,
71 int expected_page_count, 71 int expected_page_count,
72 bool has_selection, 72 bool has_selection,
73 MarginType margin_type, 73 MarginType margin_type,
74 bool is_scripted, 74 bool is_scripted,
75 bool is_modifiable, 75 bool is_modifiable,
76 const base::Closure& callback) { 76 const base::Closure& callback) {
77 DCHECK(RunsTasksOnCurrentThread()); 77 DCHECK(RunsTasksInCurrentSequence());
78 DCHECK(!is_print_dialog_box_shown_ || !is_scripted); 78 DCHECK(!is_print_dialog_box_shown_ || !is_scripted);
79 79
80 StartWorker(callback); 80 StartWorker(callback);
81 81
82 // Real work is done in PrintJobWorker::GetSettings(). 82 // Real work is done in PrintJobWorker::GetSettings().
83 is_print_dialog_box_shown_ = 83 is_print_dialog_box_shown_ =
84 ask_user_for_settings == GetSettingsAskParam::ASK_USER; 84 ask_user_for_settings == GetSettingsAskParam::ASK_USER;
85 worker_->PostTask( 85 worker_->PostTask(
86 FROM_HERE, 86 FROM_HERE,
87 base::Bind(&PrintJobWorker::GetSettings, base::Unretained(worker_.get()), 87 base::Bind(&PrintJobWorker::GetSettings, base::Unretained(worker_.get()),
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 bool PrinterQuery::is_callback_pending() const { 125 bool PrinterQuery::is_callback_pending() const {
126 return !callback_.is_null(); 126 return !callback_.is_null();
127 } 127 }
128 128
129 bool PrinterQuery::is_valid() const { 129 bool PrinterQuery::is_valid() const {
130 return !!worker_; 130 return !!worker_;
131 } 131 }
132 132
133 } // namespace printing 133 } // namespace printing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698