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

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

Issue 1143343005: chrome/browser: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 6 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/pdf_to_emf_converter.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/printing/pdf_to_emf_converter.cc ('k') | chrome/browser/printing/print_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698