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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc

Issue 2858353004: Track printer installations for each configuration. (Closed)
Patch Set: rebase Created 3 years, 7 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
Index: chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
index 33fef4d27f499f3835121bf96781cfab57cb5ec5..aa03cde147848580378a9f8c96d71c8388d0709d 100644
--- a/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/cups_printers_handler.cc
@@ -246,10 +246,12 @@ void CupsPrintersHandler::OnAddedPrinter(
chromeos::PrinterSetupResult result_code) {
std::string printer_name = printer->display_name();
switch (result_code) {
- case chromeos::PrinterSetupResult::SUCCESS:
- PrintersManagerFactory::GetForBrowserContext(profile_)->RegisterPrinter(
- std::move(printer));
+ case chromeos::PrinterSetupResult::SUCCESS: {
+ auto* manager = PrintersManagerFactory::GetForBrowserContext(profile_);
+ manager->PrinterInstalled(*printer);
+ manager->RegisterPrinter(std::move(printer));
break;
+ }
case chromeos::PrinterSetupResult::PPD_NOT_FOUND:
LOG(WARNING) << "Could not locate requested PPD";
break;
« no previous file with comments | « chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc ('k') | chromeos/printing/printer_configuration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698