Index: chromeos/printing/printer_configuration.h |
diff --git a/chromeos/printing/printer_configuration.h b/chromeos/printing/printer_configuration.h |
index 27f047bdb93e39bca6b49c6b55131a04df2dc48a..81a59e0c2a63c17af58533a4baa8b76444f44d13 100644 |
--- a/chromeos/printing/printer_configuration.h |
+++ b/chromeos/printing/printer_configuration.h |
@@ -9,6 +9,7 @@ |
#include <string> |
#include "base/macros.h" |
+#include "base/time/time.h" |
#include "chromeos/chromeos_export.h" |
namespace chromeos { |
@@ -47,7 +48,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, const base::Time& last_updated = {}); |
Lei Zhang
2017/05/08 21:42:48
Does the second parameter have to be optional? I s
Lei Zhang
2017/05/08 21:42:48
No longer explict.
skau
2017/05/09 00:52:01
There are a number of instances where we don't pro
|
// Copy constructor and assignment. |
Printer(const Printer& printer); |
@@ -93,6 +94,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. |
+ base::Time last_updated() const { return last_updated_; } |
+ |
private: |
// Globally unique identifier. Empty indicates a new printer. |
std::string id_; |
@@ -121,6 +126,9 @@ class CHROMEOS_EXPORT Printer { |
// The datastore which holds this printer. |
Source source_; |
+ |
+ // Timestamp of most recent change. |
+ base::Time last_updated_; |
}; |
} // namespace chromeos |