| Index: chrome/browser/printing/print_dialog_cloud.cc
|
| diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
|
| index d2118fcb61f941906c737d5d05e35c00b79fbbc7..39bec55d25d26e1bc345af375764c51fb9af1b9d 100644
|
| --- a/chrome/browser/printing/print_dialog_cloud.cc
|
| +++ b/chrome/browser/printing/print_dialog_cloud.cc
|
| @@ -11,8 +11,11 @@
|
| #include "base/command_line.h"
|
| #include "base/files/file_util.h"
|
| #include "base/json/json_reader.h"
|
| +#include "base/location.h"
|
| #include "base/prefs/pref_service.h"
|
| +#include "base/single_thread_task_runner.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "base/thread_task_runner_handle.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/devtools/devtools_window.h"
|
| @@ -147,10 +150,9 @@ class SignInObserver : public content::WebContentsObserver {
|
| const content::LoadCommittedDetails& details,
|
| const content::FrameNavigateParams& params) override {
|
| if (IsSimilarUrl(params.url, cloud_print_url_)) {
|
| - base::MessageLoop::current()->PostTask(
|
| - FROM_HERE,
|
| - base::Bind(&SignInObserver::OnSignIn,
|
| - weak_ptr_factory_.GetWeakPtr()));
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| + FROM_HERE, base::Bind(&SignInObserver::OnSignIn,
|
| + weak_ptr_factory_.GetWeakPtr()));
|
| }
|
| }
|
|
|
| @@ -594,7 +596,7 @@ void CloudPrintWebDialogDelegate::OnDialogClosed(
|
| // End the keep-alive so that Chrome can exit.
|
| if (!modal_parent_ && keep_alive_when_non_modal_) {
|
| // Post to prevent recursive call tho this function.
|
| - base::MessageLoop::current()->PostTask(
|
| + base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE, base::Bind(&chrome::DecrementKeepAliveCount));
|
| }
|
| delete this;
|
|
|