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

Unified Diff: chrome/browser/chromeos/printing/printer_pref_manager.cc

Issue 2618313004: [CUPS] Implement the enterprise icon for printers in Print Preview Dialog. (Closed)
Patch Set: Add the missing image. Created 3 years, 11 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/chromeos/printing/printer_pref_manager.cc
diff --git a/chrome/browser/chromeos/printing/printer_pref_manager.cc b/chrome/browser/chromeos/printing/printer_pref_manager.cc
index 3e52bf1ea9e5f0a46db689859aa443ab3a8f6a31..9d52df051827ff119cd14fdafa47718788f08821 100644
--- a/chrome/browser/chromeos/printing/printer_pref_manager.cc
+++ b/chrome/browser/chromeos/printing/printer_pref_manager.cc
@@ -139,6 +139,13 @@ std::unique_ptr<Printer> PrinterPrefManager::GetPrinter(
return printer ? printing::PrefToPrinter(*printer) : nullptr;
}
+bool PrinterPrefManager::IsEnterprisePrinter(
+ const std::string& printer_id) const {
+ return std::find(recommended_printer_ids_.begin(),
skau 2017/01/10 19:55:52 Use base::ContainsValue(), it's more straightforwa
+ recommended_printer_ids_.end(),
+ printer_id) != recommended_printer_ids_.end();
+}
+
void PrinterPrefManager::RegisterPrinter(std::unique_ptr<Printer> printer) {
if (printer->id().empty())
printer->set_id(base::GenerateGUID());

Powered by Google App Engine
This is Rietveld 408576698