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

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

Issue 2858353004: Track printer installations for each configuration. (Closed)
Patch Set: address comments 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 9c20c7908c6ca2a862ef10db7a7ae1e78044128d..f96980009d53e31166a8d5903fefe203d7016054 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;

Powered by Google App Engine
This is Rietveld 408576698