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

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

Issue 2956173002: Introduce the field make_and_model for synced printers. (Closed)
Patch Set: add back old fields Created 3 years, 5 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 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
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 88 }
89 89
90 const std::string& manufacturer() const { return manufacturer_; } 90 const std::string& manufacturer() const { return manufacturer_; }
91 void set_manufacturer(const std::string& manufacturer) { 91 void set_manufacturer(const std::string& manufacturer) {
92 manufacturer_ = manufacturer; 92 manufacturer_ = manufacturer;
93 } 93 }
94 94
95 const std::string& model() const { return model_; } 95 const std::string& model() const { return model_; }
96 void set_model(const std::string& model) { model_ = model; } 96 void set_model(const std::string& model) { model_ = model; }
97 97
98 const std::string& make_and_model() const { return make_and_model_; }
99 void set_make_and_model(const std::string& make_and_model) {
100 make_and_model_ = make_and_model;
101 }
102
98 const std::string& uri() const { return uri_; } 103 const std::string& uri() const { return uri_; }
99 void set_uri(const std::string& uri) { uri_ = uri; } 104 void set_uri(const std::string& uri) { uri_ = uri; }
100 105
101 const PpdReference& ppd_reference() const { return ppd_reference_; } 106 const PpdReference& ppd_reference() const { return ppd_reference_; }
102 PpdReference* mutable_ppd_reference() { return &ppd_reference_; } 107 PpdReference* mutable_ppd_reference() { return &ppd_reference_; }
103 108
104 const std::string& uuid() const { return uuid_; } 109 const std::string& uuid() const { return uuid_; }
105 void set_uuid(const std::string& uuid) { uuid_ = uuid; } 110 void set_uuid(const std::string& uuid) { uuid_ = uuid; }
106 111
107 // Returns true if the printer should be automatically configured using 112 // Returns true if the printer should be automatically configured using
(...skipping 15 matching lines...) Expand all
123 // Globally unique identifier. Empty indicates a new printer. 128 // Globally unique identifier. Empty indicates a new printer.
124 std::string id_; 129 std::string id_;
125 130
126 // User defined string for printer identification. 131 // User defined string for printer identification.
127 std::string display_name_; 132 std::string display_name_;
128 133
129 // User defined string for additional printer information. 134 // User defined string for additional printer information.
130 std::string description_; 135 std::string description_;
131 136
132 // The manufacturer of the printer, e.g. HP 137 // The manufacturer of the printer, e.g. HP
133 std::string manufacturer_; 138 std::string manufacturer_;
Carlson 2017/06/28 17:38:36 Do we want to mark these as deprecated?
skau 2017/06/28 21:25:35 Done.
134 139
135 // The model of the printer, e.g. OfficeJet 415 140 // The model of the printer, e.g. OfficeJet 415
136 std::string model_; 141 std::string model_;
137 142
143 // The manufactuer and model of the printer in one string. e.g. HP OfficeJet
144 // 415.
145 std::string make_and_model_;
146
138 // The full path for the printer. Suitable for configuration in CUPS. 147 // The full path for the printer. Suitable for configuration in CUPS.
139 // Contains protocol, hostname, port, and queue. 148 // Contains protocol, hostname, port, and queue.
140 std::string uri_; 149 std::string uri_;
141 150
142 // How to find the associated postscript printer description. 151 // How to find the associated postscript printer description.
143 PpdReference ppd_reference_; 152 PpdReference ppd_reference_;
144 153
145 // The UUID from an autoconf protocol for deduplication. Could be empty. 154 // The UUID from an autoconf protocol for deduplication. Could be empty.
146 std::string uuid_; 155 std::string uuid_;
147 156
148 // The datastore which holds this printer. 157 // The datastore which holds this printer.
149 Source source_; 158 Source source_;
150 159
151 // Timestamp of most recent change. 160 // Timestamp of most recent change.
152 base::Time last_updated_; 161 base::Time last_updated_;
153 }; 162 };
154 163
155 } // namespace chromeos 164 } // namespace chromeos
156 165
157 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_ 166 #endif // CHROMEOS_PRINTING_PRINTER_CONFIGURATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698