| Index: components/printing/renderer/print_web_view_helper.cc
|
| diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
|
| index ab65ed6f255d98276b33fc6e70e8d784fe36efcd..eca09fea79261bda6e8ceae1f11b4ba2ffa29b00 100644
|
| --- a/components/printing/renderer/print_web_view_helper.cc
|
| +++ b/components/printing/renderer/print_web_view_helper.cc
|
| @@ -8,13 +8,15 @@
|
|
|
| #include "base/auto_reset.h"
|
| #include "base/json/json_writer.h"
|
| +#include "base/location.h"
|
| #include "base/logging.h"
|
| -#include "base/message_loop/message_loop.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/process/process_handle.h"
|
| +#include "base/single_thread_task_runner.h"
|
| #include "base/strings/string_number_conversions.h"
|
| #include "base/strings/stringprintf.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/thread_task_runner_handle.h"
|
| #include "components/printing/common/print_messages.h"
|
| #include "content/public/common/web_preferences.h"
|
| #include "content/public/renderer/render_frame.h"
|
| @@ -727,7 +729,7 @@ void PrepareFrameAndViewForPrint::didStopLoading() {
|
| DCHECK(!on_ready_.is_null());
|
| // Don't call callback here, because it can delete |this| and WebView that is
|
| // called didStopLoading.
|
| - base::MessageLoop::current()->PostTask(
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE, base::Bind(&PrepareFrameAndViewForPrint::CallOnReady,
|
| weak_ptr_factory_.GetWeakPtr()));
|
| }
|
| @@ -1685,7 +1687,7 @@ void PrintWebViewHelper::RequestPrintPreview(PrintPreviewRequestType type) {
|
| base::Bind(&PrintWebViewHelper::ShowScriptedPrintPreview,
|
| base::Unretained(this));
|
| } else {
|
| - base::MessageLoop::current()->PostTask(
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE, base::Bind(&PrintWebViewHelper::ShowScriptedPrintPreview,
|
| weak_ptr_factory_.GetWeakPtr()));
|
| }
|
|
|