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

Unified Diff: chromeos/printing/printer_configuration.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: chromeos/printing/printer_configuration.h
diff --git a/chromeos/printing/printer_configuration.h b/chromeos/printing/printer_configuration.h
index 27f047bdb93e39bca6b49c6b55131a04df2dc48a..1b55339d70772d475489e5780140005d3896bc4a 100644
--- a/chromeos/printing/printer_configuration.h
+++ b/chromeos/printing/printer_configuration.h
@@ -47,7 +47,7 @@ class CHROMEOS_EXPORT Printer {
Printer();
// Constructs a printer object with an id.
- explicit Printer(const std::string& id);
+ explicit Printer(const std::string& id, int64_t last_updated = 0);
// Copy constructor and assignment.
Printer(const Printer& printer);
@@ -93,6 +93,10 @@ class CHROMEOS_EXPORT Printer {
Source source() const { return source_; }
void set_source(const Source source) { source_ = source; }
+ // Returns the timestamp for the most recent update. Returns 0 if the
+ // printer was not created with a valid timestamp.
+ int64_t last_updated() const { return last_updated_; }
+
private:
// Globally unique identifier. Empty indicates a new printer.
std::string id_;
@@ -121,6 +125,9 @@ class CHROMEOS_EXPORT Printer {
// The datastore which holds this printer.
Source source_;
+
+ // Timestamp of most recent change.
+ int64_t last_updated_;
};
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698