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

Unified Diff: chromeos/printing/printer_configuration.h

Issue 2408293002: Update PPDFile to PpdReference. Change the fields to a sufficient set to implement QuirksServer lo… (Closed)
Patch Set: Update PPDFile to PpdReference. Change the fields to a sufficient set to implement QuirksServer lo… Created 4 years, 2 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
« no previous file with comments | « no previous file | chromeos/printing/printer_configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/printing/printer_configuration.h
diff --git a/chromeos/printing/printer_configuration.h b/chromeos/printing/printer_configuration.h
index fc82c293798c94a84e7f71e5216374fdf54c69d9..bf4cbd250cbac8edfd20c41869e6e1e3257b1a2a 100644
--- a/chromeos/printing/printer_configuration.h
+++ b/chromeos/printing/printer_configuration.h
@@ -15,21 +15,20 @@ namespace chromeos {
class CHROMEOS_EXPORT Printer {
public:
- // Represents a Postscript Printer Description with which the printer was
- // setup.
- struct PPDFile {
- // Identifier from the quirks server. -1 otherwise.
- int id = -1;
-
- std::string file_name;
-
- // If there is a file with a later version on the quirks server, that file
- // should be used. The default value is 0.
- int version_number = 0;
-
- // This will be true if the file was retrived from the quirks server.
- // Otherwise, the file was saved to disk by the user.
- bool from_quirks_server = false;
+ // Information needed to find the PPD file for this printer.
+ struct PpdReference {
+ // If non-empty, this is the url of a specific PPD the user has specified
+ // for use with this printer.
+ std::string user_supplied_ppd_url;
+
+ // The *effective* manufacturer and model of this printer, in other words,
+ // the manufacturer and model of the printer for which we grab a PPD.  This
+ // doesn’t have to (but can) be the actual manufacturer/model of the
+ // printer.  We should always try to fill these fields in, even if we don’t
+ // think they’ll be needed, as they provide a fallback mechanism for
+ // finding a PPD.
+ std::string effective_manufacturer;
+ std::string effective_model;
};
// Constructs a printer object that is completely empty.
@@ -68,8 +67,8 @@ class CHROMEOS_EXPORT Printer {
const std::string& uri() const { return uri_; }
void set_uri(const std::string& uri) { uri_ = uri; }
- const PPDFile& ppd() const { return ppd_; }
- void SetPPD(std::unique_ptr<PPDFile> ppd);
+ const PpdReference& ppd_reference() const { return ppd_reference_; }
+ PpdReference* mutable_ppd_reference() { return &ppd_reference_; }
const std::string& uuid() const { return uuid_; }
void set_uuid(const std::string& uuid) { uuid_ = uuid; }
@@ -94,8 +93,8 @@ class CHROMEOS_EXPORT Printer {
// Contains protocol, hostname, port, and queue.
std::string uri_;
- // The associated postscript printer description.
- PPDFile ppd_;
+ // How to find the associated postscript printer description.
+ PpdReference ppd_reference_;
// The UUID from an autoconf protocol for deduplication. Could be empty.
std::string uuid_;
« no previous file with comments | « no previous file | chromeos/printing/printer_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698