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

Unified Diff: chrome/browser/chromeos/printing/printers_manager.h

Issue 2858353004: Track printer installations for each configuration. (Closed)
Patch Set: default argument 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/chromeos/printing/printers_manager.h
diff --git a/chrome/browser/chromeos/printing/printers_manager.h b/chrome/browser/chromeos/printing/printers_manager.h
index f31bd6c7d0fd766ea22b6dbfa04392dd6a22b574..7d85e699e56f5d2cfe48b8e884201a013e7f8065 100644
--- a/chrome/browser/chromeos/printing/printers_manager.h
+++ b/chrome/browser/chromeos/printing/printers_manager.h
@@ -76,6 +76,12 @@ class PrintersManager : public KeyedService {
// Returns a ModelTypeSyncBridge for the sync client.
PrintersSyncBridge* GetSyncBridge();
+ // Registers that the printer was installed in CUPS.
+ void PrinterInstalled(const Printer& printer);
+
+ // Returns true if the printer is installed in CUPS.
+ bool IsConfigurationCurrent(const Printer& printer);
+
private:
// Updates the in-memory recommended printer list.
void UpdateRecommendedPrinters();
@@ -89,8 +95,10 @@ class PrintersManager : public KeyedService {
// Contains the keys for all recommended printers in order so we can return
// the list of recommended printers in the order they were received.
std::vector<std::string> recommended_printer_ids_;
- std::map<std::string, std::unique_ptr<base::DictionaryValue>>
- recommended_printers_;
+ std::map<std::string, std::unique_ptr<Printer>> recommended_printers_;
+
+ // Map of printer ids to installation timestpamps.
Carlson 2017/05/05 23:59:16 timestamps
skau 2017/05/08 18:38:02 Done.
+ std::map<std::string, int64_t> installed_printer_timestamps_;
Carlson 2017/05/05 23:59:16 why int64_t instead of base::Time?
skau 2017/05/08 18:38:02 I didn't think about it. It's time all the way dow
base::ObserverList<Observer> observers_;

Powered by Google App Engine
This is Rietveld 408576698