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

Side by Side Diff: chromeos/printing/printer_configuration.h

Issue 2343983004: Add PPDProvider barebones implementation and associated cache skeleton. (Closed)
Patch Set: Initial PPDProvider/PPDCache implementation. Also, add associated unittests. This doesn't plumb th… Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 5 #ifndef CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
6 #define CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 6 #define CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "chromeos/chromeos_export.h" 12 #include "chromeos/chromeos_export.h"
13 13
14 namespace chromeos { 14 namespace chromeos {
15 15
16 class CHROMEOS_EXPORT Printer { 16 class CHROMEOS_EXPORT Printer {
17 public: 17 public:
18 // Information needed to find the PPD file for this printer. 18 // Information needed to find the PPD file for this printer.
19 //
20 // If you add fields to this struct, you almost certainly will
21 // want to update PpdResolver and PpdCache::GetCachePath.
22 //
23 // At resolution time, we look for a cached PPD that used the same
24 // PpdReference before.
25 //
26 // If one is not found and user_supplied_ppd_url is set, we'll fail
27 // out with NOT FOUND
28 //
29 // Otherwise, we'll hit QuirksServer to see if we can resolve a Ppd
30 // using manufacturer/model
19 struct PpdReference { 31 struct PpdReference {
20 // If non-empty, this is the url of a specific PPD the user has specified 32 // If non-empty, this is the url of a specific PPD the user has specified
21 // for use with this printer. 33 // for use with this printer.
22 std::string user_supplied_ppd_url; 34 std::string user_supplied_ppd_url;
23 35
24 // The *effective* manufacturer and model of this printer, in other words, 36 // The *effective* manufacturer and model of this printer, in other words,
25 // the manufacturer and model of the printer for which we grab a PPD.  This 37 // the manufacturer and model of the printer for which we grab a PPD.  This
26 // doesn’t have to (but can) be the actual manufacturer/model of the 38 // doesn’t have to (but can) be the actual manufacturer/model of the
27 // printer.  We should always try to fill these fields in, even if we don’t 39 // printer.  We should always try to fill these fields in, even if we don’t
28 // think they’ll be needed, as they provide a fallback mechanism for 40 // think they’ll be needed, as they provide a fallback mechanism for
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 // How to find the associated postscript printer description. 108 // How to find the associated postscript printer description.
97 PpdReference ppd_reference_; 109 PpdReference ppd_reference_;
98 110
99 // The UUID from an autoconf protocol for deduplication. Could be empty. 111 // The UUID from an autoconf protocol for deduplication. Could be empty.
100 std::string uuid_; 112 std::string uuid_;
101 }; 113 };
102 114
103 } // namespace chromeos 115 } // namespace chromeos
104 116
105 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 117 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
OLDNEW
« no previous file with comments | « chromeos/printing/ppd_provider_unittest.cc ('k') | chromeos/printing/printer_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698