Chromium Code Reviews| Index: chrome/browser/printing/printer_query.cc |
| diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc |
| index 6cd11ff067ef9537b1c6ee0131160c8eb8805b1d..80f936297cf479ee6e43e31d9324acabdeb8f78d 100644 |
| --- a/chrome/browser/printing/printer_query.cc |
| +++ b/chrome/browser/printing/printer_query.cc |
| @@ -31,6 +31,7 @@ PrinterQuery::~PrinterQuery() { |
| void PrinterQuery::GetSettingsDone(const PrintSettings& new_settings, |
| PrintingContext::Result result) { |
| is_print_dialog_box_shown_ = false; |
| + is_initiated_from_android_scripted_print_ = false; |
| last_status_ = result; |
| if (result != PrintingContext::FAILED) { |
| settings_ = new_settings; |
| @@ -42,11 +43,22 @@ void PrinterQuery::GetSettingsDone(const PrintSettings& new_settings, |
| if (!callback_.is_null()) { |
| // This may cause reentrancy like to call StopWorker(). |
| + LOG(INFO) << "DGN - GetSettingsDone - Calling PrinterQuery(" |
| + << cookie_ <<")'s stored callback"; |
| + |
| + if (is_initiated_from_android_scripted_print_) { |
| + LOG(INFO) << " DGN - THAT'S MY PQ!"; |
|
dgn
2014/11/20 12:26:16
I never get there. That's the place where I expect
|
| + is_initiated_from_android_scripted_print_ = false; |
| + } |
| callback_.Run(); |
| callback_.Reset(); |
| } |
| } |
| +void PrinterQuery::SetInitiatedFromAndroidScript() { |
| + is_initiated_from_android_scripted_print_ = true; |
| +} |
| + |
| PrintJobWorker* PrinterQuery::DetachWorker(PrintJobWorkerOwner* new_owner) { |
| DCHECK(callback_.is_null()); |
| DCHECK(worker_.get()); |