diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-20 13:40:20 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-22 12:41:23 +0000 |
commit | 7961cea6d1041e3e454dae6a1da660b453efd238 (patch) | |
tree | c0eeb4a9ff9ba32986289c1653d9608e53ccb444 /chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc | |
parent | b7034d0803538058e5c9d904ef03cf5eab34f6ef (diff) | |
download | qtwebengine-chromium-7961cea6d1041e3e454dae6a1da660b453efd238.tar.gz |
BASELINE: Update Chromium to 78.0.3904.130
Change-Id: If185e0c0061b3437531c97c9c8c78f239352a68b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc')
-rw-r--r-- | chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc b/chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc index b6021b75156..2f4c1749e9a 100644 --- a/chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc +++ b/chromium/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc @@ -260,8 +260,7 @@ CupsPrintersHandler::CupsPrintersHandler( printer_configurer_(std::move(printer_configurer)), printers_manager_(printers_manager), endpoint_resolver_(std::make_unique<local_discovery::EndpointResolver>()), - printers_manager_observer_(this), - weak_factory_(this) {} + printers_manager_observer_(this) {} // static std::unique_ptr<CupsPrintersHandler> CupsPrintersHandler::Create( @@ -745,7 +744,8 @@ void CupsPrintersHandler::OnAddedOrEditedPrinterCommon( UMA_HISTOGRAM_ENUMERATION("Printing.CUPS.PrinterAdded", printer.GetProtocol(), Printer::kProtocolMax); PRINTER_LOG(USER) << "Performing printer setup"; - printers_manager_->PrinterInstalled(printer, is_automatic); + printers_manager_->PrinterInstalled(printer, is_automatic, + PrinterSetupSource::kSettings); printers_manager_->SavePrinter(printer); if (printer.IsUsbProtocol()) { // Record UMA for USB printer setup source. @@ -945,8 +945,9 @@ void CupsPrintersHandler::FileSelected(const base::FilePath& path, // VerifyPpdContents() in order to determine whether the file appears to be a // PPD file. The task's priority is USER_BLOCKING because the this task // updates the UI as a result of a direct user action. - base::PostTaskWithTraitsAndReplyWithResult( - FROM_HERE, {base::MayBlock(), base::TaskPriority::USER_BLOCKING}, + base::PostTaskAndReplyWithResult( + FROM_HERE, + {base::ThreadPool(), base::MayBlock(), base::TaskPriority::USER_BLOCKING}, base::BindOnce(&ReadFileToStringWithMaxSize, path, kPpdMaxLineLength), base::BindOnce(&CupsPrintersHandler::VerifyPpdContents, weak_factory_.GetWeakPtr(), path)); |